Results 1 to 2 of 2
  1. #1
    Star Lounger
    Join Date
    Jun 2004
    Location
    Gtr London, England
    Posts
    90
    Thanks
    0
    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 Letter.dot, a global function (stored in the global template) runs to pick up all the styles available within Letter.dot. It then creates an additional button, as part of the toolbar, with a drop down list of the styles specific to Letter.dot. 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 Letter.dot 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 Letter.dot.

    Any help with this would be greatly appreciated.
    Jack

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Commandbar Manipulation (Office 2003)

    In Word, by default, your toolbar probably is being created in Normal.dot, unless you are setting the CustomizationContext to another template (e.g., to Letter.dot). 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
  •