Thanks so much for your prompt reply Jonathan.
I had been trying to use the CustomizationContext property, but it wasn't
having any effect (that is, I would set it to the activedocument object
before making any changes to the CommandBars, and yet still receive the
prompt).
I'm not familiar with the ThisDocument object, does it represent the
template or the document being created from the template? If it's the
latter, I wouldn't want to keep indicating that it was saved or the user
would not be prompted when they should to save their work right?
What I have done, and which seems to be working for me, is to add the line:
ActiveDocument.AttachedTemplate.Saved = True
after each modification.
Is this effectively the same as your recommendation, if not, do you see any
problems with it?
thanks.
Chip
> Thanks so much for your prompt reply Jonathan.
>
[quoted text clipped - 7 lines]
> latter, I wouldn't want to keep indicating that it was saved or the user
> would not be prompted when they should to save their work right?
It represents the file containing the code that is currently running. That
can be a document, a template or an add-in, according to circumstance.
> What I have done, and which seems to be working for me, is to add the
> line:
[quoted text clipped - 6 lines]
> any
> problems with it?
It's not necessarily the same. There are two problems with that approach.
1. You don't mention that you have set the CustomizationContext. That means
you aren't controlling where changes are getting written to. If you aren't
sure you undesratnd the CustomizationContext property, think of the Tools
Customize dialog, and the dropdown listbox that defines where customizations
are saved. That is the CustomizationContext. You have no way of knowing that
the user hasn't manually set the customization context in Tools Customize,
so you must set it yourself in code each time you make the change.
2. Using ThisDocument instead of ActiveDocument.AttachedTemplate means that
it is easier to re-use your code if you decide to do something similar as an
add-in in future.

Signature
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Chip Orange - 16 Nov 2004 18:53 GMT
ok, thanks, I'll go make the change to ThisDocument.
> > Thanks so much for your prompt reply Jonathan.
> >
[quoted text clipped - 35 lines]
> it is easier to re-use your code if you decide to do something similar as an
> add-in in future.