Share via


LeftMargin Property [Visio 2003 SDK Documentation]

Specifies the left margin, which is used when printing.

retVal =object**.LeftMargin**([UnitsNameOrCode])

object**.LeftMargin**([UnitsNameOrCode]****) = newValue

retVal     Double. The margin value expressed in the given units.

object     Required. An expression that returns a Document object.

UnitsNameOrCode     Optional Variant. The units to use when retrieving or setting the margin value. Defaults to internal drawing units.

newValue     Required Double. The new margin value.

Version added

4.0

Remarks

The LeftMargin property corresponds to the Left setting in the Print Setup dialog box (on the File menu, click Page Setup, click the Print Setup tab, and then 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 Office Visio 2003 type library in member VisUnitCodes.

Applies to | Document object

See Also | BottomMargin property | Result property | RightMargin property | TopMargin property