Toolbar disappears when I open a Word document

A

alex.abell1

I have recently been developing a number of toolbars using the
Extensibility -> Shared Add-in project in Visual Studio 2005 for
Microsoft Word. My toolbars install and work correctly. They appear as
they should when I open up MS Word but when I double click on a
document which in turn then invokes Word, my toolbar is not visible. I
have to right click on the toolbars collection at the top of Word and
choose to make it visible. Has anyone any idea why this might happen?
Any help you can give me would be very much appreciated.
 
A

alex.abell1

I have recently been developing a number of toolbars using the
Extensibility -> Shared Add-in project in Visual Studio 2005 for
Microsoft Word. My toolbars install and work correctly. They appear as
they should when I open up MS Word but when I double click on a
document which in turn then invokes Word, my toolbar is not visible. I
have to right click on the toolbars collection at the top of Word and
choose to make it visible. Has anyone any idea why this might happen?
Any help you can give me would be very much appreciated.

I found a solution to this problem which was that I was creating my
toolbar in the OnStartupComplete event where as it should go in the
OnConnection event. This ensures that the toolbar is visible when you
fire up Word directly or indirectly by double clicking on a document.
It is then important that the toolbar is correctly deleted in the
OnDisconnection event. Failure to do this will mean that you can still
see your toolbar even after you have uninstalled it but it's buttons
won't fire any events.

Many, many thanks to Sumit Kumar Dhal of Mindfire Solutions for his
help in this solution.
 

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