Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.access.formscoding,microsoft.public.word.mailmerge.fields
|
|||
|
|||
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 |
#2
Posted to microsoft.public.access.formscoding,microsoft.public.word.mailmerge.fields
|
|||
|
|||
supressing warning when opening a Word Mail Merge document from Access
In this case I do not think there is any alternative to making the registry
change described in http://support.microsoft.com/kb/825765/en-us -- Peter Jamieson http://tips.pjmsn.me.uk "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? Thanks in advance, Paul |
#3
Posted to microsoft.public.access.formscoding,microsoft.public.word.mailmerge.fields
|
|||
|
|||
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? |
#4
Posted to microsoft.public.access.formscoding,microsoft.public.word.mailmerge.fields
|
|||
|
|||
supressing warning when opening a Word Mail Merge document from Access
Hi Paul,
You can modify the registry to bypass the message in Word http://support.microsoft.com/kb/825765/en-us?FR=1 ============ "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? Thanks in advance, Paul -- Bob Buckland ?:-) MS Office System Products MVP *Courtesy is not expensive and can pay big dividends* |
#5
Posted to microsoft.public.access.formscoding,microsoft.public.word.mailmerge.fields
|
|||
|
|||
supressing warning when opening a Word Mail Merge document from Access
Actually, use my merge sample. it don't give that warning, and you don't
have to change registiry stuff etc. The sample I have can be found he http://www.members.shaw.ca/AlbertKal.../msaccess.html What is nice/interesting about my sample is that is specially designed to enable ANY form with ONE LINE of code.... Thus, each time you build a new form, you can word merge enable it with great ease. Make sure you read the instructions from above, and you should eventually get to the follwoing page http://www.members.shaw.ca/AlbertKal...rge/page2.html Note that the merge can also use a query, and thus you don't have to merge just "one" record.. After the merge occurs, you get a plain document WITHOUT any merge fields, and this allows the end user to save, edit, or even email the document (since the merge fields are gone after the merge occurs). Give the above a try… -- Albert D. Kallal (Access MVP) Edmonton, Alberta Canada |
#6
Posted to microsoft.public.access.formscoding,microsoft.public.word.mailmerge.fields
|
|||
|
|||
supressing warning when opening a Word Mail Merge document from Access
Thank you, gentlemen, for your suggestions.
Peter and Bob - Modifying the Registry is not an option because I will be deploying the front end to about 70 users, and I won't be able to change their registries, but I appreciate your taking the time to make the suggestion. Allen - I installed the GoHyperlink() function you provided, and it opened the document, but it didn't supress the warning message. The same message appeared that I get when I us the FollowHyperlink method of the Application object. However, because of the other advantages you mention in your Web page to using the function, I'm going to use it. Albert - I have yet to try your suggestion, but it's next on my list. I know you said it was super easy, but I'm not an advanced developer, so it might take me a bit of time to get it working, even with your clear instructions. I'll let you know how it works out. Again, my thanks to all for your help with this. Paul |
#7
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
supressing warning when opening a Word Mail Merge document from Access
If you can control the dot-file, it is easy to get rid of this warning. Open the dotfile (as dot) Go to mailmerge, button start mailmerge, chose "normal word document" Save the dot-file After this when you use the dot-file för mailmerge the warning will be gone! Paul;2642130 Wrote: 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?" Paul -- inge.larsson |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to prevent sql command warning when opening merge document | Mailmerge | |||
Word 2007 mail-merge SQL warning | Mailmerge | |||
word opens access in mail merge. Access is already opened.=twice | Mailmerge | |||
How do I import access data into a word mail merge document that | Mailmerge | |||
How do I mail merge a word document with an existing MA Access Qu | Mailmerge |