Word.GutterPosition enum
Specifies where the gutter appears in the document.
Remarks
Used by
Examples
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-section-starts.yaml
await Word.run(async (context) => {
// Configure document-wide page settings for a report that will be printed and bound.
const pageSetup: Word.PageSetup = context.document.pageSetup;
pageSetup.set({
paperSize: Word.PaperSize.letter,
orientation: Word.PageOrientation.portrait,
topMargin: 72,
bottomMargin: 72,
leftMargin: 90,
rightMargin: 72,
gutter: 18,
gutterPosition: Word.GutterPosition.left,
mirrorMargins: true,
oddAndEvenPagesHeaderFooter: true
});
const sections: Word.SectionCollection = context.document.sections;
sections.load("items");
await context.sync();
// Start the main chapter on an odd-numbered page so it appears on the right in a bound document.
const chapterPageSetup: Word.PageSetup = sections.items[1].pageSetup;
chapterPageSetup.sectionStart = Word.SectionStart.oddPage;
chapterPageSetup.differentFirstPageHeaderFooter = true;
// Keep the appendix in a separate section, but let it begin on the current page.
sections.items[2].pageSetup.sectionStart = Word.SectionStart.continuous;
await context.sync();
console.log("Applied print and binding settings to the report.");
});
Fields
| left = "Left" | The gutter appears on the left side of the document. |
| right = "Right" | The gutter appears on the right side of the document. |
| top = "Top" | The gutter appears at the top of the document. |