Word.TwoLinesInOneType enum
Specifies the two lines in one type.
Remarks
Used by
Examples
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/35-ranges/format-range-text-desktop.yaml
// Displays the first paragraph's text as two lines enclosed in parentheses.
await Word.run(async (context) => {
const paragraphRange: Word.Range = context.document.body.paragraphs.getFirst().getRange(Word.RangeLocation.content);
const twoLineLayout: Word.TwoLinesInOneType = Word.TwoLinesInOneType.parentheses;
paragraphRange.twoLinesInOne = twoLineLayout;
await context.sync();
console.log("Applied two-line text with parentheses.");
});
Fields
| angleBrackets = "AngleBrackets" | Two lines in one with angle brackets. |
| curlyBrackets = "CurlyBrackets" | Two lines in one with curly brackets. |
| noBrackets = "NoBrackets" | Two lines in one without brackets. |
| none = "None" | No two lines in one. |
| parentheses = "Parentheses" | Two lines in one with parentheses. |
| squareBrackets = "SquareBrackets" | Two lines in one with square brackets. |