Lasse
Mon Jun 25 09:37:00 CDT 2007
I take back my words :-)
It removed the SQL command but it still doesn't run the AutoNew macro. I
have tried creating a simple AutoNew macro that just inserts a text string on
line 1 of the document.
I have tried deleting everything inside the document so that their wasn't
anything that could cause the problem.
My simply AutoNew looks like this:
Sub AutoNew()
Selection.InsertAfter ("Bookmark test")
End Sub
"Doug Robbins - Word MVP" wrote:
> 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
>
> If you make the changes mentioned in that article, the SQL prompt will no
> longer appear.
>
> --
> 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
>
> "Lasse" <Lasse@discussions.microsoft.com> wrote in message
> news:BB26B3B9-72AA-46BE-88D6-5AEFDB25A0A5@microsoft.com...
> > Hi
> >
> > I have a template that merges data from an Excel document and I need to
> > create a AutoNew macro in it.
> > I have created the AutoNew macro and it works fine if I open up the
> > document
> > and run it through Visual Basic.
> > If I open up the template to create a new document it asks me to accept
> > the
> > SQL command that gets the information from Excel and then it seems like it
> > forgets to run the AutoNew macro.
> >
> > Have anyone seen this problem before and is there a way around it?
>
>
>