Skip to content

Latest commit

 

History

History
63 lines (37 loc) · 1.99 KB

Visio.Shape.Export.md

File metadata and controls

63 lines (37 loc) · 1.99 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Shape.Export method (Visio)
vis_sdr.chm11216265
vis_sdr.chm11216265
Visio.Shape.Export
f4051560-8719-ea9c-30eb-33230c95786c
06/08/2017
medium

Shape.Export method (Visio)

Exports an object from Microsoft Visio to a file format such as .bmp, .dib, .dwg, .dxf, .emf, .emz, .gif, .htm, .jpg, .png, .svg, .svgz, .tif, or .wmf.

Syntax

expression.Export (FileName)

expression A variable that represents a Shape object.

Parameters

Name Required/Optional Data type Description
FileName Required String The fully qualified path and name of the file to receive the exported object.

Return value

Nothing

Remarks

The file name 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.

Starting with Visio 2010, you can use various properties and methods of the ApplicationSettings object that relate to raster images to configure settings for export to .bmp, .gif, .jpg, .png, and .tif file types.

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 Visio.

Public Sub Export_Example() 
 Dim vsoPage As Visio.Page 
 Set vsoPage = ActivePage 
 vsoPage.Export ("C:\\myExportedPage.bmp") 
End Sub

[!includeSupport and feedback]