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

Depending on your version of Windows, policies, and permissions, you may be
able to suppress this message by telling Access this is a file, i.e. by
adding the file:/// prefix.

More info:
GoHyperlink() - Handle warnings, special characters, errors opening
hyperlinks
at:
http://allenbrowne.com/func-GoHyperlink.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Paul" wrote in message
. ..
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?