Table of contents
TOC
Collapse the table of content
Expand the table of content

Document.DocumentSavedAs Event (Visio)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

Occurs after a document is saved by using the Save As command.

Syntax

Private Sub expressionDocumentSavedAs( **_ByVal doc As [IVDOCUMENT]** )

expression A variable that represents a Document object.

Parameters

NameRequired/OptionalData TypeDescription
docRequired[IVDOCUMENT]The document that was saved.

Remarks

The DocumentSavedAs event is one of a group of events for which the EventInfo property of the Application object contains extra information.

If the DocumentSavedAs event is fired because a save was initiated by a user or a program, the EventInfo property returns the following string:

"/saveasfile="

If it fires because Microsoft Visio is saving a copy of an open file (for autorecovery or to include as a mail attachment), the EventInfo property returns one of the following strings:

  • If the event is fired for autorecovery purposes, the name of a recovery file in this format: "/autosavefile= drivename:\foldername\filename "

  • If the event is fired because a document copy is being made to send as a mail attachment, the name of an attachment file in this format: "/mailfile= drivename:\foldername\filename "

If you are using Microsoft Visual Basic or Visual Basic for Applications (VBA), the syntax in this topic describes a common, efficient way to handle events.

If you want to create your own Event objects, use the Add or AddAdvise method. To create an Event object that runs an add-on, use the Add method as it applies to the EventList collection. To create an Event object that receives notification, use the AddAdvise method. To find an event code for the event you want to create, seeEvent codes.

If you are handling this event from a program that receives a notification over a connection created by using the AddAdvise method, the varMoreInfo argument to VisEventProc designates the document index: "/doc=1".

© 2017 Microsoft