Hi,
I have a few templates with two macros in them. When I mail a document based
on one of these templates to someone else, it arrives without macros. I
suspected the anti-virus of deleting them, but even with anitvirus disabled
(on server, sending client and receiving client), the macros do not survive
mailing.
Where should I look for a way to fix this?
Jeroen
Jonathan West - 10 Oct 2005 14:07 GMT
Documents based on a template do not include its macros. This behavior is
different from Excel, where macros are included.
In Word, the macros are accessible to you when you create a new document
because the document includes a reference to the attached template. When you
email the document to someone, the template is no longer available.
There are two possible approaches.
1. Send the template as well.
2. Copy the macros into the document.
I would recommend the first approach. Security considerations are such that
most people have Word set up so that macros embedded in documents are
automatically disabled.

Signature
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
> Hi,
>
[quoted text clipped - 7 lines]
>
> Jeroen
Stefan Blom - 10 Oct 2005 14:20 GMT
You have to send not only the document, but also the template to your
recipients. Word macros in a template are *not* copied into documents
created from that template.

Signature
Stefan Blom
Microsoft Word MVP
> Hi,
>
[quoted text clipped - 7 lines]
>
> Jeroen
J. Verburg - 10 Oct 2005 21:05 GMT
Well, thanks for that explanation. I now understand why it seemed to work
when I mailed the document to myself!
One question to follow up: I guess the receiver would have to save the
template in his templates folder? Probably just having it in his inbox would
not be enough...?
Jeroen
> You have to send not only the document, but also the template to your
> recipients. Word macros in a template are *not* copied into documents
[quoted text clipped - 15 lines]
> >
> > Jeroen
Stefan Blom - 12 Oct 2005 11:05 GMT
See http://word.mvps.org/faqs/macrosvba/DistributeMacros.htm

Signature
Stefan Blom
Microsoft Word MVP
> Well, thanks for that explanation. I now understand why it seemed to work
> when I mailed the document to myself!
[quoted text clipped - 23 lines]
> > >
> > > Jeroen
J. Verburg - 12 Oct 2005 20:44 GMT
Just what I needed! Thanks.
Jeroen
> See http://word.mvps.org/faqs/macrosvba/DistributeMacros.htm
>
[quoted text clipped - 32 lines]
> > > >
> > > > Jeroen
Stefan Blom - 13 Oct 2005 08:12 GMT
Glad I could help.

Signature
Stefan Blom
Microsoft Word MVP
> Just what I needed! Thanks.
>
[quoted text clipped - 36 lines]
> > > > >
> > > > > Jeroen