Hello,
I am writing a C# Visio COM-AddIn for visio 2007 using Visual Studio 2005.
I am trying to add an anchored window using the Windows.Add method, but I can only choose VisWinTypes.visStencilAddon as a type. All other types always result in the exception "Invalid window type for this action".
When the type is VisWinTypes.visStencilAddon, a window does appear (no exception).
The code that throws the exception is
Window visioWindow = vsoApplication.Windows.Add(
VisWindowStates.visWSAnchorLeft |
VisWindowStates.visWSAnchorAutoHide |
VisWindowStates.visWSVisible,
VisWinTypes.visAnchorBarBuiltIn
,55, 55, 100, 100, null, null, null);
I have tried many variations with the argumets, but when VisWinTypes is not visStencilAddon, the exception occures.
It is possible that the problem is not with the VisWinType, but with the other argumets. I just don't know.
Any ideas ?
Thanks