Hi all.
I'm working on an solution and I required to open several stencils any given time. I'm using the code line:
Private Sub Openstencil()
Dim CurrentDir As String
CurrentDir = Application.ActiveDocument.Path
Dim vsoWindow As Visio.Window
On Error GoTo Err_Handler
Application.Documents.OpenEx CurrentDir & "\sys\stn\Stencil1.vssm", visOpenDocked
Exit Sub
Err_Handler:
MsgBox "An error has ocurred", vbExclamation + vbOKOnly
End Sub
I'd like to do it without opening the shape search window, like when you undock a stencil from the Shape Search window, the stencil window "floating" on the Drawing window.
I know that this line close the Shape Search window :
Visio.ActiveWindow.Windows.ItemFromID(visWinIDShapeSearch).Close
But, is it possible to "undock" my stencil from the shape search window before I close it? Or how do I open my stencils without opening the shape search window?
best regards!
You might find this of interest, it's a bit long. http://visguy.com/vgforum/index.php?topic=124.0 (http://visguy.com/vgforum/index.php?topic=124.0)