Author Topic: Visio 2010 issue: Visio crashes on moving custom stencil window (+workaround)  (Read 5604 times)

0 Members and 1 Guest are viewing this topic.

Nikolay

  • Hero Member
  • *****
  • Posts: 1144
    • UnmanagedVisio
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"):
Code
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:
Code
ActiveWindow.Windows.Add "MyWindow", 0, visDockedStencilAddon,,,,,"MyWindow","MyWindow"

NB: This worked in Visio 2003, 2007.
« Last Edit: October 30, 2010, 02:21:44 AM by Nikolay »