Closing Visio Documents

The Document Object has a Close method with this syntax:

docObj.Close

However, if you are running your application from VBA within Visio, you need to ensure that you are not closing the document that contains the code you are executing. This may seem obvious; however, a bit of planning will save you hours of grief when you deal with misbehaving applications.

If you have a document orchestrating the automated opening, printing, and closing of other documents within the given session of Visio, the Close method of the Document object is a perfect method of closing out the documents after you are through working with them. Remember that the Close method does exactly that: it immediately closes the document. No changes are ...

Get Professional Development with Visio® 2000 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.