A Microsoft Word forum. Microsoft Office Word Forum - WordBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Microsoft Office Word Forum - WordBanter forum » Microsoft Word Newsgroups » Mailmerge
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Macro Security



 
 
Thread Tools Display Modes
  #1  
Old December 28th 05, 07:19 PM posted to microsoft.public.word.mailmerge.fields
external usenet poster
 
Posts: n/a
Default Macro Security

I am using VBA in an Access 2003 database to open a Word 2003 mail merge
document that is attached to the database. Even with the Word macro security
settings set to low the mail merge document is not connecting to the data
source. I have looked through various macro security documents to no avail.
Can anyone shed some light on what's happening?
Ads
  #2  
Old December 29th 05, 03:40 PM posted to microsoft.public.word.mailmerge.fields
external usenet poster
 
Posts: n/a
Default Macro Security

Hi =?Utf-8?B?RGFu?=,

I am using VBA in an Access 2003 database to open a Word 2003 mail merge
document that is attached to the database. Even with the Word macro security
settings set to low the mail merge document is not connecting to the data
source.

See this article

"Opening This Will Run the Following SQL Command" Message When You Open a Word
Document - 825765
http://support.microsoft.com?kbid=825765

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
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 :-)

  #3  
Old December 29th 05, 08:04 PM posted to microsoft.public.word.mailmerge.fields
external usenet poster
 
Posts: n/a
Default Macro Security

Yes, I had read this article previously but it is not exactly clear. So, even
though I answer YES to the SQL prompt the merge document will not connect to
its data source? In order to allow the doc to connect I need to edit the
registry as per the article regardless of the macro security level setting?

"Cindy M -WordMVP-" wrote:

Hi =?Utf-8?B?RGFu?=,

I am using VBA in an Access 2003 database to open a Word 2003 mail merge
document that is attached to the database. Even with the Word macro security
settings set to low the mail merge document is not connecting to the data
source.

See this article

"Opening This Will Run the Following SQL Command" Message When You Open a Word
Document - 825765
http://support.microsoft.com?kbid=825765

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
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 :-)


  #4  
Old December 30th 05, 11:54 AM posted to microsoft.public.word.mailmerge.fields
external usenet poster
 
Posts: n/a
Default Macro Security

Hi =?Utf-8?B?RGFu?=,

Yes, I had read this article previously but it is not exactly clear. So, even
though I answer YES to the SQL prompt the merge document will not connect to
its data source? In order to allow the doc to connect I need to edit the
registry as per the article regardless of the macro security level setting?

When you use VBA to open a mail merge document, it cuts off the data source
without prompting. You have basically two choices:

1. Use the OpenDataSource method in your VBA code in order to link the data
source in each time

2. Set the Registry key mentioned in the article so that the SQL prompt is
completely disabled on the machine

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
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 :-)

  #5  
Old January 4th 06, 05:40 PM posted to microsoft.public.word.mailmerge.fields
external usenet poster
 
Posts: n/a
Default Macro Security

The IT dept has nixed the registry edit mechanism, so, I'll have to use the
OpenDataSource Method. Can I run this method using MS Access VBA or will I
still run into the same problem? I have made a couple initial attempts with
no success. My initial code is as follows:

Set oDoc = GetObject(Forms![frmDocsMain]![Sub]![FilePath], "Word.Document")
oDoc.Application.Visible = True
oDoc.Application.WindowState = wdWindowStateMaximize

If its possible, from here I'm not exactly sure how to proceed with the
OpenDataSource code.



"Cindy M -WordMVP-" wrote:

Hi =?Utf-8?B?RGFu?=,

Yes, I had read this article previously but it is not exactly clear. So, even
though I answer YES to the SQL prompt the merge document will not connect to
its data source? In order to allow the doc to connect I need to edit the
registry as per the article regardless of the macro security level setting?

When you use VBA to open a mail merge document, it cuts off the data source
without prompting. You have basically two choices:

1. Use the OpenDataSource method in your VBA code in order to link the data
source in each time

2. Set the Registry key mentioned in the article so that the SQL prompt is
completely disabled on the machine

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
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 :-)


  #6  
Old January 5th 06, 11:37 AM posted to microsoft.public.word.mailmerge.fields
external usenet poster
 
Posts: n/a
Default Macro Security

Hi =?Utf-8?B?RGFu?=,

Can I run this method using MS Access VBA or will I
still run into the same problem? I have made a couple initial attempts with
no success. My initial code is as follows:

Set oDoc = GetObject(Forms![frmDocsMain]![Sub]![FilePath], "Word.Document")
oDoc.Application.Visible = True
oDoc.Application.WindowState = wdWindowStateMaximize

If its possible, from here I'm not exactly sure how to proceed with the
OpenDataSource code.

Best is to record linking to the data source in a Word macro, then copy the
result into your automation code and make any necessary adjustments (such as
replacing the hard-coded file path with a variable).

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
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 :-)

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Word has stopped access to the Endnote 6.0 with macro security Tired and cranky student Microsoft Word Help 1 April 27th 05 01:05 AM
Macro Security JD Microsoft Word Help 11 April 24th 05 03:02 PM
macro security will not stay set jam Microsoft Word Help 1 April 6th 05 12:03 PM
Prevent User from Changing Macro Security JoyceJoseph Microsoft Word Help 1 March 31st 05 08:49 PM
Save As is not working due to macro security settings Craig Meritz Microsoft Word Help 1 December 16th 04 04:53 AM


All times are GMT +1. The time now is 11:52 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright 2004-2019 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.