Harvey was telling us:
Harvey nous racontait que :
> Hi Jean
> Yes there are some macros that add new toolbars and remove most of
> toolbars and a lot of customization and protection for toolbars.
> Thanks :)
Then this is probably the cause.
When you modify toolbars in a template (and save the results), the template
bloats. At least, this has been my experience.
Whenever I have to code something like this, I make sure that the changes
(to the toolbar) are not saved to the template.
This needs more coding because I have to rebuild the toolbar every time a
document is open. But it can be done.
I did something like this for a template that could create four distinct
types of document, each with its own toolbar set of menus.
I had to cater or the fact that a user cold have all four type of documents
opened at the same time, and thus navigate from one document to the other.
The toolbar had to dynamically change according to the document being
displayed in the active window...
I use document variables and document properties to keep track of the info I
needed and used those flags to rebuild the toolbar on the fly. This meant
that my code was full of
ThisDocument.Saved = True
statements to avoid having the user being bother with a prompt every time
they closed the last document based on the template. (If they said yes when
asked if they wanted to save the template, it would have bloated.)
There may be a way around that, but I have not figured it out yet. I must
admit that I have not looked into it too much either because in all cases it
was never practical for me to save the changes to the toolbars anyway, so
the "ThisDocument.Saved = True" approach has worked fine. The only problem
with this approach is that the user cannot create AutoText entries (or
otherwise save changes to the template) and save them to the template or
they will save the toolbar changes along the way. But this has never been an
issue with the projects I have been involved with.

Signature
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org
Harvey - 26 Feb 2007 19:53 GMT
Hi Jean Thanks for quick response
Those macros I mentioned are working in the background ( as soon as the
user opens a document which has that template as attachment It automatically
removes all toolbars except of 2 toolbars and also disables or removes a lot
of commands from menu bars and toolbars . So the user don't have any option
to make even minor changes to the toolbars . Having said this I don't think
we save anything into the template in terms of changes in the toolbars but
thanks for your views it gives me a clue to work on the problem but it seems
this bloating problem is more serious than it looks especially for large
documents and heavily coded templates.
Thank you again :)
> Harvey was telling us:
> Harvey nous racontait que :
[quoted text clipped - 37 lines]
> they will save the toolbar changes along the way. But this has never been an
> issue with the projects I have been involved with.