API Reference
Class
WordMargins
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
- Parent document.
- wordSection OfficeIMO.Word.WordSection
- Section associated with the margins.
Methods
public static WordSection SetMargins(WordSection wordSection, WordMargin pageMargins) #Returns:
WordSectionApplies a predefined margin configuration to the given section.
Parameters
- wordSection OfficeIMO.Word.WordSection
- Target section to update.
- pageMargins OfficeIMO.Word.WordMargin
- Predefined margin set to apply.
Returns
The updated section.
Inherited Methods
public override Boolean Equals(Object obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object
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 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.