Click to See Complete Forum and Search --> : Word MailMerge prob


richardj
May 29th, 2001, 07:18 AM
Hi all; I'm working on code which uses Word97 to do mail merge.

I'd like users to be able to open an existing Word doc (ie possibly not one
of mine) to base the merge doc on if they wish, but:
if the user opens an existing mail merge doc whose data source is missing
for any reason, Word (invisible at this stage) opens the 'locate data
source' dialog, and seems to retain execution control until the dialog is dealt
with. The result is an apparently frozen screen.

I can't find any way to error trap this, because the doc must be open before
I can check any of its mail merge properties, I think. By the time Word
opens the doc, it doesn't seem to want to accept anything more from the
automation code until its dialog gets an answer.

Please, can anybody help? Is there a proper solution (ie without using a timer control/sending keystrokes)?