On Tue, 26 Feb 2008 14:41:01 -0800, Geoff332
>Hi,
>
>I have a bunch of documents that use all sorts of macro code to format and
>control the document. The documents are all based on a template and the code
>is located in the template.
>
>I want to add a "publish" function that will prepare the document for
>sending out to customers (update a few fields, set document protection etc).
>At the completion of the publish function, I want it to either disable or
>remove the macros from the published instance document. This is important,
>because we don't want to expose the macros and other bits and pieces to our
>customers (or even to have the warning dialogue pop-up).
>
>Is this possible?
>
>The second piece that would be wonderful is to add the ability to reactivate
>the code from the original template, to allow us to manage and update the
>document. I can assume that the original template is available for this
>function.
You're under the mistaken impression that the macros from the template are
duplicated in the documents based on the template. They are not. The macros are
available when the document is open *on your computer* because the document
maintains a link to the template (visible in the Tools > Templates & Add-ins
dialog).
When you send the document to another computer that doesn't have the template,
the macros will not be available there. Because the original template isn't
available, the document will be attached to the recipient's Normal.dot template
instead.
When the document is returned to you, use the Tools > Templates & Add-ins dialog
to reattach it to the original template. Then the macros will be available
again.
For more discussion, see
http://www.shaunakelly.com/word/templaterelations/index.html.
--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.