Well, i just tried something like this and the SQL registry setting didn't
obviously make a difference. However, what does happen depends on the code
you're running in Access.
What happened on my system was that when I opened the document (from an
Access VBA routine), Word did open and execute the merge. Then your code
closes the mail merge main document. It's helpful to make Word visible
before opening the document so you can see what's happening. If you don't do
that, you won't see anything.
Anyway, after the macro runs, the result document is there in Word. However,
if you are running from an Access module that sets the Word object to
nothing or quits Word, chances are you will either be left with invisible
WINWORD processes in your Windows task list, or the output document will
just be deleted.
Peter Jamieson
>I have heard of this issue before, and I think at this point I am fine with
> having the users click <Yes> at the prompt for letting the SQL run. Once
[quoted text clipped - 28 lines]
>> > the
>> > orginal merge document. No errors, no debug, no copy that I can see.
Todd K. - 16 Nov 2006 19:08 GMT
The code I run in Access simply does a hyperlink to open up the Word document
(Application.FollowHyperlink "I:\Applications\Databases\Amendment_Ren.doc"),
it's the code below in the Word document that is supposed to open up a copy
and close the original. I guess I have two questions:
1) If I adjust the SQL registry setting, will it allow the code below to
operate in the Word document?
2) If not, what else could it be?
> Well, i just tried something like this and the SQL registry setting didn't
> obviously make a difference. However, what does happen depends on the code
[quoted text clipped - 46 lines]
> >> > the
> >> > orginal merge document. No errors, no debug, no copy that I can see.
Peter Jamieson - 16 Nov 2006 23:45 GMT
OK, when I do it that way, the main thing that stops anything from happening
is when I set macro Security in Word to High, i.e. so Word simply won't run
the macros unless the conditions are right.
Peter Jamieson
> The code I run in Access simply does a hyperlink to open up the Word
> document
[quoted text clipped - 67 lines]
>> >> > orginal merge document. No errors, no debug, no copy that I can
>> >> > see.
Todd K. - 17 Nov 2006 13:18 GMT
Jamieson, you're a genius! I hadn't even thought about reducing security in
Word, once I did, the code worked perfectly.
Thanks!
> OK, when I do it that way, the main thing that stops anything from happening
> is when I set macro Security in Word to High, i.e. so Word simply won't run
[quoted text clipped - 73 lines]
> >> >> > orginal merge document. No errors, no debug, no copy that I can
> >> >> > see.