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
Matt Ackerman - 28 Jan 2004 16:58 GMT
You might find this helpful:
http://support.microsoft.com/default.aspx?scid=kb;en-
us;827891&Product=wrd2003
Good luck!
>-----Original Message-----
>I have a macro that opens a MailMerge .doc
[quoted text clipped - 21 lines]
>
>.
John Grierson - 29 Jan 2004 14:35 GMT
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
>-----Original Message-----
>You might find this helpful:
[quoted text clipped - 30 lines]
>>
>.
Cindy M -WordMVP- - 28 Jan 2004 17:31 GMT
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
>
[quoted text clipped - 6 lines]
>
> 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
:-)
John Grierson - 29 Jan 2004 14:29 GMT
Many thanks, Cindy. Now runs without problem
John
>-----Original Message-----
>Hi John,
[quoted text clipped - 27 lines]
>
>.