Word.UnderlineType enum

表示支持的下划线格式样式。

注解

[ API 集:WordApi 1.1 ]

示例

// Underline format text
// Run a batch operation against the Word object model.
await Word.run(async (context) => {

    // Create a range proxy object for the current selection.
    const selection = context.document.getSelection();

    // Queue a command to underline the current selection.
    selection.font.underline = Word.UnderlineType.single;

    // Synchronize the document state by executing the queued commands,
    // and return a promise to indicate task completion.
    await context.sync();
    console.log('The selection now has an underline style.');
});

字段

dashLine = "DashLine"

单个短划线下划线。

dashLineHeavy = "DashLineHeavy"

粗划线下划线。

dashLineLong = "DashLineLong"

长划线下划线。

dashLineLongHeavy = "DashLineLongHeavy"

长粗划线下划线。

dotDashLine = "DotDashLine"

交替的点破折线下划线。

dotDashLineHeavy = "DotDashLineHeavy"

粗点划线下划线。

dotLine = "DotLine"

警告:dotLine 已弃用。

dotted = "Dotted"

虚线下划线。

dottedHeavy = "DottedHeavy"

粗点下划线。

double = "Double"

双下划线。

hidden = "Hidden"

警告:已弃用隐藏。

mixed = "Mixed"
none = "None"

无下划线。

single = "Single"

单个下划线。 此值为默认值。

thick = "Thick"

单个粗下划线。

twoDotDashLine = "TwoDotDashLine"

交替的点-点-短划线下划线。

twoDotDashLineHeavy = "TwoDotDashLineHeavy"

交替的粗点-点-短划线下划线。

wave = "Wave"

单个波浪下划线。

waveDouble = "WaveDouble"

双波浪下划线。

waveHeavy = "WaveHeavy"

粗波浪下划线。

word = "Word"

仅对单个字词下划线。