OfficeIMO

API Reference

Class

WordMargins

Namespace OfficeIMO.Word
Assembly OfficeIMO.Word

Provides access to page margin settings for a document section.

Inheritance

  • Object
  • WordMargins

Constructors

public WordMargins(WordDocument wordDocument, WordSection wordSection) #

Initializes a new instance for managing margins within the specified section.

Parameters

wordDocument OfficeIMO.Word.WordDocument requiredposition: 0
Parent document.
wordSection OfficeIMO.Word.WordSection requiredposition: 1
Section associated with the margins.

Methods

public static WordSection SetMargins(WordSection wordSection, WordMargin pageMargins) #
Returns: WordSection

Applies a predefined margin configuration to the given section.

Parameters

wordSection OfficeIMO.Word.WordSection requiredposition: 0
Target section to update.
pageMargins OfficeIMO.Word.WordMargin requiredposition: 1
Predefined margin set to apply.

Returns

The updated section.

Properties

public UInt32Value Left { get; set; } #

Get or set the left margin in Twips

public UInt32Value Right { get; set; } #

Get or set the right margin in Twips

public Nullable<Int32> Top { get; set; } #

Get or set the top margin in Twips

public Nullable<Int32> Bottom { get; set; } #

Get or set the left margin in Twips

public Nullable<Double> TopCentimeters { get; set; } #

Get or set the top margin in centimeters

public Nullable<Double> BottomCentimeters { get; set; } #

Get or set the bottom margin in centimeters

public Nullable<Double> LeftCentimeters { get; set; } #

Get or set the left margin in centimeters

public Nullable<Double> RightCentimeters { get; set; } #

Get or set the right margin in centimeters

public UInt32Value HeaderDistance { get; set; } #

Get or set the header distance in Twips

public UInt32Value FooterDistance { get; set; } #

Get or set the footer distance in Twips

public UInt32Value Gutter { get; set; } #

Gets or sets the gutter size in Twips.

public Nullable<WordMargin> Type { get; set; } #

Gets or sets a predefined margin set that matches the current settings.