Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / November 2006

Tip: Looking for answers? Try searching our database.

Dynamic toolbar?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
eric - 09 Nov 2006 14:32 GMT
I have a global toolbar with some buttons that should be possible to access
from all docs that I'm working with. However, I also have some specific
templates with their own toolbars. The problem then is that I get two
different new toolbars instead of just one.

I wonder:

1) Is it possible to add buttons to the global toolbar *without* it
affecting new documents based on a new template.

Example:

a) Global toolbar has 2 buttons.
b) I open a new document based on template A. I add 2 buttons *specific* for
template A to Global toolbar. Global toolbar now has 2+2 buttons.
c) I open a new document based in template B. I *don't* want it to show the
Global toolbar with the two extra buttons from template A. Possible?

2) If 1 doesn't work. Can I force the two toolbars to show on the same row
*with the Global toolbar always to the left*? When I try I can put them on
the sam row but with the Global toolbar always to the right = it moves all
the time depening on what template I use = not what I want if there is an
option.

Thanks.

/e
Jean-Guy Marcil - 09 Nov 2006 19:30 GMT
eric was telling us:
eric nous racontait que :

> I have a global toolbar with some buttons that should be possible to
> access from all docs that I'm working with. However, I also have some
[quoted text clipped - 15 lines]
> show the Global toolbar with the two extra buttons from template A.
> Possible?

Yes, this can be done.

But, this will require a lot of code and very thorough testing. This is no
beginner project!

First, look here for information on Class Modules and Application Events.
You will need a DocumentChange event:
   http://word.mvps.org/faqs/macrosvba/AppClassEvents.htm

Then you will have to write code in the DocumentChange Sub that will
add/hide/remove/unhide buttons on the global toolbar when you
create/close/switch documents..

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org

eric - 09 Nov 2006 21:42 GMT
Ok, thats what I suspected. Thanks for your reply!

Best
/e

> eric was telling us:
> eric nous racontait que :
[quoted text clipped - 31 lines]
> add/hide/remove/unhide buttons on the global toolbar when you
> create/close/switch documents..
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.