Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / July 2006

Tip: Looking for answers? Try searching our database.

Editing Data source

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Greg - 25 Jul 2006 23:00 GMT
I would like to use VBA to edit the data source.  Is it possible.

To fully explain, I create a Text file from SQL data that my documents then
link to.

In my Text data file I have several empty fields (along with those
containing data) that I would like to add content to.

I would prefer to add the content using MS Words VBA instead of the Program
I use to create the Text file.

Opening a Mail-Merge Document there is an icon on the tool bar that allows
editing to the data source.

Is there anyway to access the function it uses?.

Signature

Gregory M. La Due
Twin Tiers Technologies, Inc.
Senior Programmer
gml@twintierstech.com
(800) 480-6467

Peter Jamieson - 26 Jul 2006 00:00 GMT
>I would like to use VBA to edit the data source.  Is it possible.
> Opening a Mail-Merge Document there is an icon on the tool bar that allows
> editing to the data source.
>
> Is there anyway to access the function it uses?.

Not as far as I know - the best you can do is get Word to display its own
dialog box, i.e. Word does not provide you with any facilities in its object
model for modifying the data in a data source.

In any case, Word does not always let you edit a data source. it depends on
the version of Word and the type of data source. For example, sometimes Word
2000 asks you if you want to open MS Query to edit the source. In Word
2002/3, Word will not let you edit a .mdb unless it is in the format it
recognises as an "Office Address List", and so on.

If you happen to know what kind of data source you are dealing with, you
might for example be able to use Word VBA, Word Userforms, and ADO to
present the data and allow it to be edited. Or you might be able to use DDE
to fire up MS Query yourself and let the user edit data in there. But
Microsoft does not provide a single "abstraction" mechanism that lets you do
that kind of thing with no concern for the underlying data format. In my
experience, it's one of those problems that people in the I.T. like to
imagine was solved decades ago, but in reality is still an outstanding and
everyday problem.

Peter Jamieson

>I would like to use VBA to edit the data source.  Is it possible.
>
[quoted text clipped - 11 lines]
>
> Is there anyway to access the function it uses?.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.