Group: microsoft.public.word.vba.general
From: "Jonathan West"
Date: Tuesday, March 04, 2008 3:21 PM
Subject: Re: Share Toolbar for multiple templates


"Jean-Guy Marcil" wrote in message
news:9061295B-EE15-4BA3-B802-2F4974EB9A92@microsoft.com...
> "Jean-Guy Marcil" wrote:
>
>> overly-cautious nature made me name each toolbar differently... This must
>> be
>> why your approach does not have this problem... All toolbars have the
>> same
>> name, right? If not, why is it that even if you have 3 active attached
>> templates you still get only one instance of the toolbar?
>
> Never mind... I must have gone to bed too late last night!
> As long as you do not have three template in the global folder, each
> document has only one attached template, so of course, only one toolbar
> will
> be displayed at the time...
>
> I think that I am confusing issues here becasue I had a project where I
> had
> to use a few global templates... Hence the problem I had with the many
> toolbars... I can't remember the specifics... It was a few years ago...
> (Or
> it may have been another project where the toolbar had to be diffrent
> depending on the type of document, but the client wanted only one
> template...
> So I needed Application events to check the type of document being
> displayed
> and modify the toolbar on the fly...)
>
> That'll teach me to try to help somebody based on a hazy recollection!
>
> Thanks for your input!

This is the standard way I proceed these days for my commercial templates. I
have a lot of VBA code for them, and it makes sense to have it included in
the overall project only once, and have the individual templates use the
bits they need from a customized toolbar in the document template which
calls code in the add-in.


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup