Problem with SetCustomMenus

C

Chuck Cobb

I have an Visio Add-in that adds custom menus to Visio - it works fine when I
have a Visio document opened and add menus to the document, but what I want
to also be able to do is add a custom menu to the Visio application before
the document is open...I can't seem to get that to work and the documentation
seems to indicate that it should be possible. The code is almost identical
in both cases - I create the menus in exactly the same way using a uiObj to
add the menus to a Visio Document or Visio Application the only difference is
in the last step where the code for adding the custom menus to a document is:

vsoDoc.SetCustomMenus(uiObj)

and the code for adding the custom menus to the application is

vsoApp.SetCustomMenus(uiObj)

The first instance of adding menus to a Visio Document (vsoDoc) works fine
and the menus show up where they should be. In the second instance, the code
seems to work without error and seems to add the custom menus to the Visio
application, but the custom menus don't show up.

Any idea what I'm doing wrong?

Thanks,

Chuck
 
P

Paul Herber

I have an Visio Add-in that adds custom menus to Visio - it works fine when I
have a Visio document opened and add menus to the document, but what I want
to also be able to do is add a custom menu to the Visio application before
the document is open...I can't seem to get that to work and the documentation
seems to indicate that it should be possible. The code is almost identical
in both cases - I create the menus in exactly the same way using a uiObj to
add the menus to a Visio Document or Visio Application the only difference is
in the last step where the code for adding the custom menus to a document is:

vsoDoc.SetCustomMenus(uiObj)

and the code for adding the custom menus to the application is

vsoApp.SetCustomMenus(uiObj)

The first instance of adding menus to a Visio Document (vsoDoc) works fine
and the menus show up where they should be. In the second instance, the code
seems to work without error and seems to add the custom menus to the Visio
application, but the custom menus don't show up.

Any idea what I'm doing wrong?

When you create uiObj are you getting the CustomMenus or BuiltinMenus?
 

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