Table of contents
Collapse the table of content
Expand the table of content

Document.RightMargin Property (Visio)

office 365 dev account|Last Updated: 6/12/2017
1 Contributor

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


expression . RightMargin( UnitsNameOrCode )

expression A variable that represents a Document object.


NameRequired/OptionalData TypeDescription
UnitsNameOrCodeOptionalVariantThe units to use when retrieving or setting the margin value.

Return Value



If UnitsNameOrCode is not provided, the RightMargin property will default to internal drawing units (inches).

The RightMargin property corresponds to the Right 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.RightMargin ( visInches ) = newValue

Document.RightMargin (65) = newValue

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

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 Visio type library in member VisUnitCodes .

© 2018 Microsoft