open or add document as hidden ?

Started by spooner, October 21, 2012, 08:28:05 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

spooner

In my C# Visio 2010 add-in I open vsd files/vss stencils and process them. The user schouldn't  see the pages/documents which are processed, so I do:

Documents.AddEx(@"", Visio.VisMeasurementSystem.visMSMetric, (short)Microsoft.Office.Interop.Visio.VisOpenSaveArgs.visAddHidden +   (short)Microsoft.Office.Interop.Visio.VisOpenSaveArgs.visAddNoWorkspace )

and

openEx(diagram, (short)Microsoft.Office.Interop.Visio.VisOpenSaveArgs.visOpenHidden );


but nevertheless there are jumping stencils windows at the left Visio application window, I think they are docked to the opened documents, but aren't opened as hidden. Is there a way to avoid this?

charlykuntz

Maybe you can try this:

Iterate the main window's windows collection and set the visible property to false where the window type is VisWinTypes.visStencil