Document.SaveAs method (Visio)
Saves a document and gives it a file name.
Syntax
expression.SaveAs (FileName)
expression A variable that represents a Document object.
Parameters
Name | Required/Optional | Data type | Description |
---|---|---|---|
FileName | Required | String | The file name for the document. |
Return value
Integer
Remarks
The SaveAs method can accept drive names that use the universal naming convention (UNC), for example, \corporation\marketing.
Beginning with Visio 2002, you can save your drawing as an XML drawing (.vdx), an XML stencil (.vsx), or an XML template (.vtx).
If your Visual Studio solution includes the Microsoft.Office.Interop.Visio reference, this method maps to the following types:
- Microsoft.Office.Interop.Visio.IVDocument.SaveAs(string)
Example
This Microsoft Visual Basic for Applications (VBA) macro shows how to use the SaveAs 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 SaveAs_Example()
'Use the SaveAs method to save a document for the first time.
ThisDocument.SaveAs "path\filename .vsd"
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.
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기