Export Method [Visio 2003 SDK Documentation]
Exports an object from Microsoft Office Visio to a file format such as .bmp, .dib, .dwg, .dxf, .emf, .emz, .gif, .htm, .jpg, .png, .svg, .svgz, .tif, or .wmf.
object**.Export**FileName
object Required. An expression that returns a Page, Master, Selection, or Shape object to export.
FileName Required String. The fully qualified path and name of the file to receive the exported object.
Version added
3.0
Remarks
The file extension indicates which export filter to use. If the filter is not installed, the Export method returns a compiler error in your Visual Basic or VBA project. The Export method uses the default preference settings for the specified filter and does not prompt the user for non-default arguments.
The Export method of a Page object supports saving to HTML file format using the extension .htm or .html. When pages are exported, Visio uses the settings that were last selected in the Save As dialog box.
If the specified file already exists, Visio replaces it without prompting the user.
Example
This example shows how to export a Visio page as a bitmap (.bmp) file. It assumes a drawing page is open and active in Microsoft Office Visio.
Public Sub Export_Example()
Dim vsoPage As Visio.Page
Set vsoPage = ActivePage
vsoPage.Export ("C:\\myExportedPage.bmp")
End Sub
Applies to | Master object | Page object | Selection object | Shape object
See Also | Import method