I am attempting to upgrade a Word Macro from Word 2000 that runs as a
forground task scheduled via windows scheduler on a unattended server.
During the running of the macro it opens a template built for mail merge that
latter dynamically attaches to a CSV data source.

The issue I am having is that under 2003 opening the templete stops with
"Opening this document will run the following SQL command:" goes on to list
the CSV data source file path which I believe is a request to attach the data
source.

I need to suppress this request message. Currently the template is being
opened with "Documents.Add Template:=Tmplt, newtemplate:=True,
documenttype:=0"
The current folder contains the template named in the variable "Tmplt".

Suggestions?
--
Ron H

Re: Word Macro opening Mail Merge Template by Doug

Doug
Mon Jan 07 02:16:59 PST 2008

See the following Knowledge Base article:

"Opening This Will Run the Following SQL Command" Message When You Open a
Word Document - 825765 at:

http://support.microsoft.com?kbid=825765 test


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Ron H" <RonH@discussions.microsoft.com> wrote in message
news:EC459DA7-5E05-477E-878D-C35F2277F24C@microsoft.com...
>I am attempting to upgrade a Word Macro from Word 2000 that runs as a
> forground task scheduled via windows scheduler on a unattended server.
> During the running of the macro it opens a template built for mail merge
> that
> latter dynamically attaches to a CSV data source.
>
> The issue I am having is that under 2003 opening the templete stops with
> "Opening this document will run the following SQL command:" goes on to
> list
> the CSV data source file path which I believe is a request to attach the
> data
> source.
>
> I need to suppress this request message. Currently the template is being
> opened with "Documents.Add Template:=Tmplt, newtemplate:=True,
> documenttype:=0"
> The current folder contains the template named in the variable "Tmplt".
>
> Suggestions?
> --
> Ron H



Re: Word Macro opening Mail Merge Template by Brian

Brian
Wed Jan 09 07:17:14 PST 2008

On Jan 7, 5:16=A0am, "Doug Robbins - Word MVP" <d...@REMOVECAPSmvps.org>
wrote:
> See the following Knowledge Base article:
>
> "Opening This Will Run the Following SQLCommand" Message When You Open a
> Word Document - 825765 at:
>
> http://support.microsoft.com?kbid=3D825765=A0test
>
> --
> Hope this helps.
>
> Please reply to the newsgroup unless you wish to avail yourself of my
> services on a paid consulting basis.
>
> Doug Robbins - Word MVP

That solution does not appear to work for "Limited" accounts.
[The registry entry works fine for "Administrator" accounts, though.]
Any additional thoughts/suggestions?