Word.UnderlineType enum
Represents the supported styles for underline format.
Remarks
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" | A heavy dash underline. |
| dashLineLong = "DashLineLong" | A long dash underline. |
| dashLineLongHeavy = "DashLineLongHeavy" | A long heavy dash underline. |
| dotDashLine = "DotDashLine" | An alternating dot-dash underline. |
| dotDashLineHeavy = "DotDashLineHeavy" | A heavy dot-dash underline. |
| dotLine = "DotLine" | Warning: dotLine has been deprecated. |
| dotted = "Dotted" | A dotted underline. |
| dottedHeavy = "DottedHeavy" | A heavy dotted underline. |
| 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" | An alternating heavy dot-dot-dash underline. |
| wave = "Wave" | A single wavy underline. |
| waveDouble = "WaveDouble" | A double wavy underline. |
| waveHeavy = "WaveHeavy" | A heavy wavy underline. |
| word = "Word" | Only underline individual words. |