Stat Property [Visio 2003 SDK Documentation]

Returns status information for an object.

intRet = object**.Stat**

intRet     Integer. A bit mask of status bits.

object     Required. An expression that returns an object in the Applies to list.

Version added

3.0

Remarks

If an object is a reference to an entity in a document, and if that document closes, the Stat property returns a value in which the visStatClosed bit is set.

If an object is a reference to an entity that has been deleted, the Stat property returns a value in which the visStatDeleted bit is set.

A Component Object Model (COM) object, such as a Microsoft Office Visio Document object, lives as long as it is held (pointed to) by a client, even if the object is logically in a deleted or closed state.

Example

This Microsoft Visual Basic for Applications (VBA) macro shows how to use the Stat property to check the status of a Document object. Executing the macro prints 0 (visStatNormal) and then 8 (visStatClosed) in the Immediate window.

Public Sub Stat_Example()
 
    Dim vsoDocument As Visio.Document 
    Set vsoDocument = Documents.Add("") 
    Debug.Print vsoDocument.Stat 
    vsoDocument.Close 
    Debug.Print vsoDocument.Stat 

End Sub

Applies to | Application object | Cell object | Characters object | Color object | Colors collection | Connect object | Connects collection | Document object | Font object | Fonts collection | Hyperlink object | Hyperlinks collection | InvisibleApp object | Layer object | Layers collection | Master object | Masters collection | MasterShortcut object | MasterShortcuts collection | OLEObject object | OLEObjects collection | Page object | Pages collection | Row object | Section object | Selection object | Shape object | Shapes collection | Style object | Styles collection | Window object

See Also | BeforeDocumentClose event