mamue
Mon Mar 03 06:13:19 PST 2008
On Mar 3, 3:00 pm, Jean-Guy Marcil
<JeanGuyMar...@discussions.microsoft.com> wrote:
> "mamue" wrote:
> > Hi,
>
> > is it possible to share a toolbar to use it within multiple templates?
> > I've put the template with the toolbar to be shared in the office
> > startup folder, but i want the toolbar to appear only in specific
> > templates, not in everyone.
>
> For this to truely work, you will need application events.
> You need to detect when a document is created/opened, then you need to check
> the attached template, if it belongs to your list, display the toolbar,
> otherwise hide it. Then, becasue a user may work with many documents at once,
> all based, maybe, on different templates, you also need to detect when the
> user changes from document to document and display/hide the toolbar as
> appropriate. I have done something like this in the past and I can assure you
> that it is not trivial. For someone who has experience with VBA and
> Application events, it is not difficult, but it does take some time as a fair
> amount of code has to be written and checked.
>
> If you are a VBA beginner, this is quite a challenge! In any case, since you
> need to go through Application Events, you may want to find out about them,
> start here:
>
http://word.mvps.org/faqs/macrosvba/AppClassEvents.htm
Thanks Jean-Guy, i'll check that page, altough i hope for a more
trivial way ;-)