Hi.

I have a macro that I've constructed in word which will insert bookmarks as
per a table template that I've created in our Visual FoxPro based
database/frontend. The Visual FoxPro frontend inserts this information into
Word - and I've also instructed it to use a word template which contains my
Macro

The Macro works fine, but what I'm wanting to do is automate the process,
rather than having to run the Macro once the document has been produced from
FoxPro, using the .dot file.

Is there any way to make this happen? I've tried several of the On-Events
but none of them seem to work. What I basically want it to do, is once the
Document has been opened and the information has been sent to it from our
FoxPro database, that the Macro automatically runs

Thanks in Advance
David Bloch
Houston Medical

Re: Running a Macro in a Template, on Event by Tom

Tom
Fri Jan 07 09:20:44 CST 2005

You may want to look in to Auto macros. Here's a couple of quick sources:

WD2000: Auto Macros in Word
http://support.microsoft.com/?kbid=211659

Running a macro automatically when a document is created, opened or closed
http://word.mvps.org/FAQs/MacrosVBA/DocumentEvents.htm

How to create global event procedures similar to AutoOpen, AutoNew and
AutoClose, without using Normal.dot
http://word.mvps.org/FAQs/MacrosVBA/PseudoAutoMacros.htm

--
Tom Winter
Tom@NoSpam.AmosFiveSix.com

"David" <David@discussions.microsoft.com> wrote in message
news:761327AF-D315-46AA-AFCC-B1A3437F108F@microsoft.com...
> Hi.
>
> I have a macro that I've constructed in word which will insert bookmarks
as
> per a table template that I've created in our Visual FoxPro based
> database/frontend. The Visual FoxPro frontend inserts this information
into
> Word - and I've also instructed it to use a word template which contains
my
> Macro
>
> The Macro works fine, but what I'm wanting to do is automate the process,
> rather than having to run the Macro once the document has been produced
from
> FoxPro, using the .dot file.
>
> Is there any way to make this happen? I've tried several of the On-Events
> but none of them seem to work. What I basically want it to do, is once the
> Document has been opened and the information has been sent to it from our
> FoxPro database, that the Macro automatically runs
>
> Thanks in Advance
> David Bloch
> Houston Medical