View Single Post
  #1   Report Post  
Posted to microsoft.public.access.formscoding,microsoft.public.word.mailmerge.fields
Paul Paul is offline
external usenet poster
 
Posts: 3
Default supressing warning when opening a Word Mail Merge document from Access

I'm using the following line of code in Access to open a word document
linked to my database with an ODBC connection that populates some Mail Merge
fields:

Application.FollowHyperlink "C:\PAM\PAM_Mail_Merge\mail_merge1.doc"

However, before the Word document will open, it displays the following
warning message:

"Opening this document will run the following SQL command:
Select * from 'tblMailMerge'
Data from the database will be placed in the document. Do you want
to continue?"

I would like to suppress this warning message, and I have tried using
"DoCmd.SetWarnings False" in the VBA code in Access, but it doesn't work
because the message is coming from Word rather than from Access.

Is there a way to suppress that warning message in Word when you open a mail
merge file?

Thanks in advance,

Paul