Viewer.OnDocumentLoaded event (Visio Viewer)

Occurs after a document is loaded into Microsoft Visio Viewer.

Syntax

expression.OnDocumentLoaded

expression An expression that returns a Viewer object.

Return value

Nothing

Remarks

You can load a document into Visio Viewer programmatically by using the Load method.

To capture the OnDocumentLoaded event when you are coding in Visual Basic 6.0, load the document in the Form_Paint() procedure. The event may not occur in response to calling the Load method within the Form_Load() procedure.

Example

The following code shows how to display a message in the Immediate window when a document is loaded in Visio Viewer, showing the name of the document.

Private Sub vsoViewer_OnDocumentLoaded()

        Debug.Print "Document loaded is "; vsoViewer.SRC

End Sub

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.