visio 2007 doesn't shut down when shown in an OLE object

Started by ziko, December 09, 2010, 06:33:31 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ziko

Hello,
I embed visio in an OLE object, I open it to draw some shapes and then close it, using the following code:

oleObj.DoVerb(vbOLEShow)

''After executing some code I close it:
If oleObj.AppIsRunning Then
    Call oleObj.object.Close
End If

When using visio 2003 everything works fine.
With visio 2007 the closing has a problem: the document closes but the application framework doesn't close, and I have to close it manually.

Any help is much appreciated,
Ziko

Paul Herber

Have you tried setting oleobj.AppIsRunning to false before closing?
Electronic and Electrical engineering, business and software stencils for Visio -

https://www.paulherber.co.uk/

ziko

Hi Paul,
the Code: Call oleObj.object.Close
Sets the oleObj.AppIsRunning to False, I don't have to write it explicitly.
I give it also a try but with no significance.

Thank You,
Ziko

ziko

Strange that the oleObj.Object.Quit didn't work with visio 2003 so I checked if the
oleObj.Object.Class = "Visio.Drawing.12" then use the quit command and it closed it.