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 / Programming / September 2006

Tip: Looking for answers? Try searching our database.

Changing datasource file

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Markus - 27 Sep 2006 20:29 GMT
I would like to programmatically change the path to a datasource for a .doc
used for mailmerge.  These files are sent to me and the path used for the
datasource does not exist on my network.

The problem is that when I load the .doc file, it cannot find the datasource
path and prompts me, interrupting the program.  

Anyone know if there is a way to stop the prompt?  If not, anyone know of a
way aruond the prompt that would allow you to change the path to the
datasource?

Thanks for any and all ideas,
Mark
Peter Jamieson - 28 Sep 2006 11:07 GMT
Unfortunately this is a Catch-22 situation:
a. you cannot avoid or dismiss the prompt via code (as far as I know) -
although if anyone has Windows-level source code for detecting a window and
clicking the correct button (cf. the utility that does that with the Outlook
security prompt when merging to e-mail), you may be able to adapt that.
b. you can only change the datasource when the document is open

FWIW the path is editable if the user saves the document in (the round-trip)
Web Page format but you may have no control over that.

Another thing you can try is
a. open a blank document
b. use Insert|File to insert the mail merge document. At this point you
have a non-mail merge maiin document (as far as I know)
c. open the data source
d. save the file

Again, you may well lose stuff in headers/Footers and so on.

Peter Jamieson

>I would like to programmatically change the path to a datasource for a .doc
> used for mailmerge.  These files are sent to me and the path used for the
[quoted text clipped - 11 lines]
> Thanks for any and all ideas,
> Mark
 
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.