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

Document.SaveAsEx Method (Visio)

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

Saves a document with a file name using extra information passed in an argument.


expression . SaveAsEx( FileName , SaveFlags )

expression A variable that represents a Document object.


NameRequired/OptionalData TypeDescription
FileNameRequiredStringThe file name for the document.
SaveFlagsRequiredIntegerHow to save the file.

Return Value



The SaveAsEx method is identical to the SaveAs method, except that it provides an extra argument in which the caller can specify how the document is to be saved.

The SaveFlags argument should be a combination of the following values.

visSaveAsRO&;H1The document is saved as read-only.
visSaveAsWS&;H2The current workspace is saved with the file.
visSaveAsListInMRU&;H4The document is included in the Most Recently Used (MRU) list. By default, Save and SaveAs do not place the document into the MRU list.


This Microsoft Visual Basic for Applications (VBA) macro shows how to use the SaveAsEx method. Before running this macro, change path to the location where you want to save the drawing, and change filename to the name you'd like to assign the file.

Public Sub SaveAsEx_Example() 

 'Use the SaveAsEx method to save the drawing as a 
 'new read-only drawing. 
 ThisDocument.SaveAsEx "path\filename.vsd ", visSaveAsRO 

End Sub
© 2018 Microsoft