Opening document will run place data in doc--with attached templat

G

Guest

I have quite a number of mail-merge documents that are attached to a template
that contains macros. The documents themselves have macros enabled (.docm
files).

For some reason, when I open any of these documents, it asks the following
question:
SELECT * FROM C:\temp\output.txt
Opening this document will run the following SQL command:

Data from your database will be placed in the document. Do you want to
continue?

If I attach the Normal template instead of my macro template, I don't get
this message. There is an AutoOpen macro in the macro-enabled template, but
I'm holding down SHIFT while the document opens and I've verified that
AutoOpen does NOT run.

The file that I'm asked about getting data from, the "output.txt" file, is
one that I AM using as a mail-merge data source. However, I've removed the
header source information so that the files should NOT be trying to get their
fields from the data source. (Besides, in my opinion, the fact that I do NOT
get the message when I attach Normal instead of the macro template shows that
it's a template problem, not a mail-merge problem.)

Does anyone have any ideas?
 
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