Problem with Word 2003 (not earlier versions)

J

John Grierson

I have a macro that opens a MailMerge .doc

In Word 2003 I receive the message:
"Opening this document will run the following SQL
command
SELECT *. FROM filename
Data from your database will be placed in the
document. Do you want to continue?"

Can I insert code to force YES

As a work aroung I have tried changing the document to Not
Mailmerge and then coding to MailMerge in the macro.

This avoids the above problem but then always asks for the
field separator. In this case have tried adding
Application.DefaultTableSeparator = "," 'cos they are
comma delimited, but this has no effect.

Advice gratefully received.

John
 
C

Cindy M -WordMVP-

Hi John,

See the following article

"Opening This Will Run the Following SQL Command" Message
When You Open a Word Document - 825765
http://support.microsoft.com?kbid=825765
I have a macro that opens a MailMerge .doc

In Word 2003 I receive the message:
"Opening this document will run the following SQL
command
SELECT *. FROM filename
Data from your database will be placed in the
document. Do you want to continue?"

Can I insert code to force YES

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update
Sep 30 2003)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any
follow question or reply in the newsgroup and not by e-mail
:)
 
J

John Grierson

Many thanks, Cindy. Now runs without problem

John
-----Original Message-----
Hi John,

See the following article

"Opening This Will Run the Following SQL Command" Message
When You Open a Word Document - 825765
http://support.microsoft.com?kbid=825765


Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update
Sep 30 2003)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any
follow question or reply in the newsgroup and not by e- mail
:)

.
 
J

John Grierson

Useful lead, thanks Matt. Though one bit of advice on that
page is unhelpful:

Searching for OpenDataSource brings no results
Open Data Source does! Have sent them a comment.

John
 

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