Results 1 to 2 of 2
  1. #1
    Star Lounger
    Join Date
    Jun 2004
    Gtr London, England
    Thanked 0 Times in 0 Posts

    Commandbar Manipulation (Office 2003)

    Help .... please !!!!

    I have a global template that, on load, creates a toolbar. When I open a specific template ie, a global function (stored in the global template) runs to pick up all the styles available within It then creates an additional button, as part of the toolbar, with a drop down list of the styles specific to Everything appears to work well ... the problem I'm getting is when the document closes.

    I would like the "styles" command bar button to be deleted (as each "styles" button is specific to each template). I have placed some code, within the template, under This Document, File|Close which states:

    CommandBars(c_strCommandBar).Controls("Styles").De lete

    which deletes the button the first time I use it, if I use the template again the "styles" button does not delete. I think I've set this up incorrectly but can't see where I'm going wrong.

    Another problem (I'm unsure whether this is related) when the document closes I receive a prompt to save the document, after selected, "No", I then get another prompt to save

    Any help with this would be greatly appreciated.

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Silicon Valley, USA
    Thanked 94 Times in 90 Posts

    Re: Commandbar Manipulation (Office 2003)

    In Word, by default, your toolbar probably is being created in, unless you are setting the CustomizationContext to another template (e.g., to Try being very explicit about the CustomizationContext and see if that helps resolve the second issue. (Maybe it will also help with the first issue?)

Posting Permissions

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