Macro works fine... but...?

K

Kenneth

Howdy,

I'm using Word 2002 and know next to nothing about VBA, but
have had much success with the "R&T" approach (that is,
Record, and Tweak.)

I just did that with a bunch of macros to do simple mail
merge functions, and they work fine, with one modest
difficulty:

When I run the macros, a dialog appears that says:

"Opening this document will run the following SQL command

SELECT*FROM Z:\MailMerge\LET.TXT

When I clear the dialog by manually clicking OK, the merge
continues properly, and all is well.

What command can I put in the code to eliminate that manual
intervention?

That is, what command will tell Word to use the designated
data file for the merge?

(I will add that I tried to use the VBA help file, but can't
get it to work properly. When I try to enter anything in the
search field, instead of seeing the field entry mouse
cursor, I see the "<-->" cursor of the sort used to widen a
form. No matter what I do, I can't change that cursor shape,
and so, can't find a way to access the search function of
help. I would certainly welcome any insight into that
wrinkle...)

Sincere thanks,
 
D

Doug Robbins - Word MVP

See the following Knowledge Base article:

"Opening This Will Run the Following SQL Command" Message When You Open a
Word Document - 825765 at:

http://support.microsoft.com?kbid=825765


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

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