Word.UnderlineType enum

The supported styles for underline format.

Remarks

[ API set: WordApi 1.1 ]

Examples

// 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.');
});

Fields

dashLine = "DashLine"

A single dash underline.

dashLineHeavy = "DashLineHeavy"
dashLineLong = "DashLineLong"
dashLineLongHeavy = "DashLineLongHeavy"
dotDashLine = "DotDashLine"

An alternating dot-dash underline.

dotDashLineHeavy = "DotDashLineHeavy"
dotLine = "DotLine"

Warning: dotLine has been deprecated.

dotted = "Dotted"

A dotted underline.

dottedHeavy = "DottedHeavy"
double = "Double"

A double underline.

hidden = "Hidden"

Warning: hidden has been deprecated.

mixed = "Mixed"
none = "None"

No underline.

single = "Single"

A single underline. This is the default value.

thick = "Thick"

A single thick underline.

twoDotDashLine = "TwoDotDashLine"

An alternating dot-dot-dash underline.

twoDotDashLineHeavy = "TwoDotDashLineHeavy"
wave = "Wave"

A single wavy underline.

waveDouble = "WaveDouble"
waveHeavy = "WaveHeavy"
word = "Word"

Only underline individual words.