I am running XP and Office 2003. I have a Word macro that opens a Word merge document, which is connected to a text file as its data source. When I open this document manually, I receive a prompt to run the SQL command and click OK to do so. When I open the document from a macro, however, there is no prompt and the document is stripped of its datasource. How can I
1) Get rid of the annoying prompt that comes up every time I open the file manually
2) Get the Word macro to open the document with its data source intact
I have reviewed the information located at http://www.gmayor.com/mail_merge_labels_with_word_xp.htm, but it does not address this issue
Thanks for any help you can provide
Christin
Doug Robbins - Word MVP - DELETE UPPERCASE CHARACTERS FROM EMAIL ADDRESS - 24 Mar 2004 03:54 GMT
To get rid of the prompt, you have to add a registry entry. Go to this site:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;825765
I am not sure why the datasource would not remain with the document.
However you can use the
[DocumentObject].MailMerge.OpenDataSource
command to attach a datasource to the document.

Signature
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.
Hope this helps
Doug Robbins - Word MVP
>I am running XP and Office 2003. I have a Word macro that opens a Word
>merge document, which is connected to a text file as its data source. When
[quoted text clipped - 14 lines]
>
> Christine
Christine - 25 Mar 2004 00:21 GMT
Thank you Doug. I will try having the macro attach the datasource
Christine