ApplicationSettings.SetRasterExportSize method (Visio)

Sets the raster export size.

Syntax

expression.SetRasterExportSize (size, Width, Height, sizeUnits)

expression An expression that returns an ApplicationSettings object.

Parameters

Name Required/Optional Data type Description
size Required VisRasterExportSize The raster export size. See Remarks for possible values.
Width Optional Double The raster export size width. Must be greater than or equal to 1.
Height Optional Double The raster export size height. Must be greater than or equal to 1.
sizeUnits Optional VisRasterExportSizeUnits The units used to specify size. See Remarks for possible values.

Return value

Nothing

Remarks

The size parameter must be one of the following VisRasterExportSize constants.

Constant Value Description
visRasterFitToScreenSize 0 Use screen size.
visRasterFitToPrinterSize 1 Use printer size.
visRasterFitToSourceSize 2 Use source size.
visRasterFitToCustomSize 3 Use custom size.

If size is anything other than visRasterFitToCustomSize, SetRasterExportSize ignores all other parameters.

If size is visRasterFitToCustomSize, SetRasterExportSize accepts values for all parameters, if they meet the noted constraints. If they don't meet these constraints, SetRasterExportSize returns an Invalid Parameter error.

The sizeUnits parameter must be one of the following VisRasterExportSizeUnits constants.

Constant Value Description
visRasterPixel 0 Pixels
visRasterCm 1 Centimeters
visRasterInch 2 Inches

When the SetRasterExportSize method runs successfully, the resulting settings will remain in effect until you either run the method again or change the settings in the user interface.

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.