OK, this is where the story gets really complicated.
You _can_ copy the macros into the document that's being sent. (You can
either copy/paste the code from the template into the document in the VBA
editor, or use the Organizer [Tools > Macro > Macros > Organizer] to move
the whole module.)
The problem is that as soon as Microsoft allowed macros to be saved in
documents, it took about 5 minutes for the scumbags of the world to write
viruses as macros and send them out to infect and destroy. As defense,
Microsoft had to put in a mechanism to stop unknown macros from running. At
Tools > Macro > Security, there are various levels ranging from Low (don't
catch anything, which is Not Recommended) to Very High (almost complete
interdiction). Most people keep the default level of High, which disables
any macros that don't have a digital security signature.
To email a document containing macros and expect the macros to run, you need
to sign the macros. First you need a security certificate. There are several
kinds.
- The "gold standard" is one issued by a Root Authority such as Verisign
(
https://securitycenter.verisign.com/celp/enroll/retail) or Thawte
(
https://www.thawte.com/ssl-digital-certificates/code-signing/codesign_technical.html),
but these cost big money. If your company has a certificate server, you may
be able to get one more easily.
- For more casual use, you can generate a certificate for yourself, although
it won't be as trustworthy as a root-derived certificate. Run the program
SelfCert.exe in the same Office folder that contains the WinWord.exe program
(location depends on the Office version).
Once you have a certificate, and you've copied the macros into the document
in the VBA editor, click Tools > Digital Signature > Choose. Select the
signature, click OK, and save the document.
When a recipient opens the form for the first time, they'll be asked to
accept the certificate. Your email should tell them to do so. After that,
the form and any other documents signed with the same certificate will open
without macro security warnings if the recipient's security level is High or
less. (If it's Very High, they'll have to save the document to a "trusted
location" first. That's a whole other story.)
--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
Okay, you are right, the macros are not being sent. Can you help me
with what I need to do to make sure the macros are included when I
send the form? Thank you!!!