Reply
 
Thread Tools Display Modes
  #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


  #2   Report Post  
Posted to microsoft.public.access.formscoding,microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default 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   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?


  #4   Report Post  
Posted to microsoft.public.access.formscoding,microsoft.public.word.mailmerge.fields
Bob Buckland ?:-\) Bob   Buckland ?:-\) is offline
external usenet poster
 
Posts: 2,073
Default 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   Report Post  
Posted to microsoft.public.access.formscoding,microsoft.public.word.mailmerge.fields
Albert D. Kallal Albert D. Kallal is offline
external usenet poster
 
Posts: 1
Default 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   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

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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
inge.larsson inge.larsson is offline
external usenet poster
 
Posts: 1
Default 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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to prevent sql command warning when opening merge document Daversey Mailmerge 2 April 22nd 12 04:54 AM
Word 2007 mail-merge SQL warning Simon Maystre Mailmerge 4 February 1st 07 05:02 PM
word opens access in mail merge. Access is already opened.=twice Sherri Mailmerge 1 February 11th 06 06:59 PM
How do I import access data into a word mail merge document that Rayomand Mailmerge 1 November 29th 05 10:46 PM
How do I mail merge a word document with an existing MA Access Qu Prince of Darkness Mailmerge 1 October 23rd 05 05:11 AM


All times are GMT +1. The time now is 05:46 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"