Visio Guy

Visio Discussions => Visio 2010 Issues => Topic started by: Nikolay on October 30, 2010, 07:12:45 AM

Title: Visio 2010 issue: Visio crashes on moving custom stencil window (+workaround)
Post by: Nikolay on October 30, 2010, 07:12:45 AM
Hello,
It seems that due to some changes in stencil layout Visio 2010 got some issue with custom stencils
(it crashes on moving custom docked stencil)

To reproduce:

1. Create a new drawing.
2. Add a custom stencil window using the following VBA code (the important part is that window should be of type "visDockedStencilAddon"):

ActiveWindow.Windows.Add "MyWindow", 0, visDockedStencilAddon


3. Drag this new custom stencil window down in vertical direction (using mouse)

4. Visio 2010 crashes  :(

To workaround this you should specify "bstrMergeID" and "bstrMergeClass" for the "add window" function:

ActiveWindow.Windows.Add "MyWindow", 0, visDockedStencilAddon,,,,,"MyWindow","MyWindow"


NB: This worked in Visio 2003, 2007.