Document.LeftMargin property (Visio)

Specifies the left margin, which is used when printing. Read/write.

Syntax

expression.LeftMargin (UnitsNameOrCode)

expression A variable that represents a Document object.

Parameters

Name Required/Optional Data type Description
UnitsNameOrCode Optional Variant The units to use when retrieving or setting the margin value. Defaults to internal drawing units.

Return value

Double

Remarks

The LeftMargin property corresponds to the Left setting in the Print Setup dialog box (on the Design tab, click the Page Setup arrow, and then, on the Print Setup tab, click Setup).

You can specify UnitsNameOrCode as an integer or a string value. If the string is invalid, an error is generated. For example, the following statements all set UnitsNameOrCode to inches.

  • Document.LeftMargin (visInches) = newValue

  • Document.LeftMargin (65) = newValue

  • Document.LeftMargin ("in") = newValue where "in" can also be any of the alternate strings representing inches, such as "inch", "in.", or "i".

For a complete list of valid unit strings along with corresponding Automation constants (integer values), see About units of measure.

Automation constants for representing units are declared by the Microsoft Visio type library in member VisUnitCodes.

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.