Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Apr 2003
    Location
    Gtr London, England
    Posts
    1
    Thanks
    0
    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...

    Matt

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •