word add-in c++ toolbar invisible at 2nd start of word

B

Birgit

Hi all!
I compiled & registered the c++ add-in example at
http://support.microsoft.com/kb/q230689/

The first time I start Word the toolbar is displayed correctly. The second
time I start Word the toolbar gets set to invisible. All other functionality
works ok.

How can I keep the toolbar visible? (Delete is not even practical in my
application)

It appears the toolbar is not deleted when unloading (which ought to happen
if I read the code correctly). The only way to delete the toolbar is by way
of (translated freely) Tools, Options, Templates and Addins, Organizer,
Toolbars. An ordinary delete by way of Customize is unsuccessful.

Once I successfully delete the toolbar the Add-in runs once as advertised.
Is there some point in the interaction with normal.dot that I'm missing?

I run Win XP, Word 2003, VC++ 2003.

Please help. I have spent several hours with google already.

Birgit
 
B

Birgit

I found the problem: 2nd line below had to be added to the code of
CMyAddin::OnStartupComplete. Obvious? Yessss!

// Make the CommandBar visible...

vtParam.vt = VT_BOOL; vtParam.boolVal = TRUE;

hr = PutProperty(m_pOurCmdBar, L"Visible", &vtParam);
 

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