NativeExcel for .Net Developer's Reference

IPageSetup.RightMargin Property

Gets or sets the size of the right margin, in inches.

[Visual Basic]
PropertyRightMarginAsDouble
[C#]
doubleRightMargin{get;set;}
[C++]
__propertydoubleget_RightMargin();
__propertyvoidset_RightMargin(double);
[JScript]
functiongetRightMargin():double
functionsetRightMargin(double);

Property Value

Double. Size of the right margin, in inches.

Example

This example set the right margin of sheet one to 1/2 inches.

[C#]
book.Worksheets[1].PageSetup.RightMargin = 0.5;
[VisualBasic]
book.Worksheets(1).PageSetup.RightMargin = 0.5
[C++]
book->Worksheets->Item[1]->PageSetup->RightMargin = 0.5;

See Also

IPageSetup Interface | NativeExcel Namespace | HeaderMargin | FooterMargin | BottomMargin | TopMargin | LeftMargin | PageSetup Property