Changing datasource file

M

Markus

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
 
P

Peter Jamieson

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top