Word.TwoLinesInOneType enum

指定一个类型中的两行。

注解

API 集:WordApiDesktop 1.4

使用方

示例

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/28-formatting/apply-character-layout-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 to the first paragraph.");
});

字段

angleBrackets = "AngleBrackets"

尖括号中的两行合二为一。

curlyBrackets = "CurlyBrackets"

两行合二为一,带大括号。

noBrackets = "NoBrackets"

两行合二为一,不带括号。

none = "None"

没有两行合二为一。

parentheses = "Parentheses"

两行合二为一,括号。

squareBrackets = "SquareBrackets"

两行合二为一,方括号。