ToolBars Donot get Deleted

S

Sameer B.Kulkarni

I have made a add-in. When I unregister the dll the
problems starts During the shutdown even i try to delete
the created buttons in toolbar and Menu.This application
runs for all the office application but the buttons
remains on the toolbar and Menubar even after I delete it.
this only happens for Word but rest excel and other
aplliation donot show the deleted buttons Please help!


I tried to change the PIP File IT problem still persist!
 
C

Cindy M -WordMVP-

Hi Sameer,

Word has a property CustomizationContext. You need to set
this before you start making changes to any toolbar.

Unlike other Office applications, Word maintains toolbars in
various containers: the activeDocument, the
ActiveDocument.AttachedTemplate, the NormalTemplate, or any
member of the Templates collection that's also a global
addin.

If you don't specify this, Word will make a "best guess". And
then it usually ends up trying to delete from a different
container than where you created buttons and toolbars.
I have made a add-in. When I unregister the dll the
problems starts During the shutdown even i try to delete
the created buttons in toolbar and Menu.This application
runs for all the office application but the buttons
remains on the toolbar and Menubar even after I delete it.
this only happens for Word but rest excel and other
aplliation donot show the deleted buttons

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep
30 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any follow
question or reply in the newsgroup and not by e-mail :)
 
O

Oliver Young

Word has a property CustomizationContext. You need to set
this before you start making changes to any toolbar.

Unlike other Office applications, Word maintains toolbars in
various containers: the activeDocument, the
ActiveDocument.AttachedTemplate, the NormalTemplate, or any
member of the Templates collection that's also a global
addin.
Please, provide code sample for this.

Thank you.
 
C

Cindy M -WordMVP-

Hi Oliver,

Well, I'm sure I have provided any number of samples in the
past, that would be available by searching Google on my name and
CustomizationContext, but very roughly:

Dim cb as Office.CommandBar
'Store changes in the doc's template
Application.CustomizationContext = _
ActiveDocument.AttachedTemplate
Set cb = CommandBars.Add 'etc.
Please, provide code sample for this.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep 30
2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any follow
question or reply in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top