Thanks to both of you. I thought Word embedded the template macros in each
instance of the document (the way it does with styles). Obviously, this isn't
an issue.
"Jonathan West" wrote:
>
> "Geoff332"
> news:E642BA89-D7E4-4360-89B5-9C58945AE451@microsoft.com...
> > 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?
>
> If you create a document based on a template, the macros are not contained
> in the document. The macros in thwe template remain available because the
> document references the template. If you send a document out to a customer
> without sending the template, the customer will not have the macros. You
> don't need to take any special action to achieve this.
>
> >
> > 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.
>
> provided that you re-open the document on a PC that has the template, then
> the macros will be automatically available again. Provided the template is
> in the same location as fore, or is in one of Word's recognised locations
> (e.g. in the user templates folder) then again, no special action is
> required.
>
>
> --
> Regards
> Jonathan West - Word MVP
> www.intelligentdocuments.co.uk
> Please reply to the newsgroup
>
>