Unable to add menu entry to Visio

T

Thomas Klaus

Hi there,

On some test machines we encountered problems adding a menu to the
active Visio instance.

--snip
Interop.Visio.Application app =
(Interop.Visio.Application)Marshal.GetActiveObject("Visio.Application");

CommandBarPopup popup = app.CommandBars.ActiveMenuBar.Controls.Add(
MsoControlType.msoControlPopup,
Missing.Value, Missing.Value, 8, true);
--snip

Error message:
System.Runtime.InteropServices.COMException (0x80004005) : unspecified
failure

But if the menu is added to the existing File menu, the error never
occurs!

Any suggestions?

Thanks in advance,
Thomas
 

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