Results 1 to 2 of 2
Thread: Activate document (Word 2000)
2003-04-04, 12:22 #1
- Join Date
- Apr 2003
- Gtr London, England
- Thanked 0 Times in 0 Posts
Activate document (Word 2000)
I have a Word Template which is used to create a document. Within that template I need to perform some version checking, and enable / disable certain functionality dependent on the template version upon which a document is based. I can successfully do all of this with one problem - if a user opens a document based on the old template, the relevant toolbar is disabled (GOOD!), whereas if they open a document based on the new version, the toolbar is enabled (ALSO GOOD!). However, if they open one of each, the enabling of the toolbar will be based on the version number of the most recently opened document.
What I would like to do is to detect when the user switches between documents using the Window menu within Word, and re-run the code which enables / disables the toolbar. Is this possible - and if so how?
Thanks in advance...
2003-04-04, 13:01 #2
- Join Date
- Mar 2002
- Thanked 30 Times in 30 Posts
Re: Activate document (Word 2000)
In <post#=203498>post 203498</post#>, you will a method to enable/disable a menu item depending on the template attached to the active document. This can easily be adapted to enable/disable a toolbar. Instead of setting the Enabled property of a command bar control, you'll be setting the Enabled property of a command bar.
See if the post mentioned above is enough to get you started; post back if you experience problems or need more help.
BTW: save often, and make backup copies. Working with application-level events can be tricky.