Word.Interfaces.FontUpdateData interface

An interface for updating data on the Font object, for use in font.set({ ... }).

Properties

bold

Specifies a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false.

color

Specifies the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name.

doubleStrikeThrough

Specifies a value that indicates whether the font has a double strikethrough. True if the font is formatted as double strikethrough text, otherwise, false.

hidden

Specifies a value that indicates whether the font is tagged as hidden. True if the font is formatted as hidden text, otherwise, false.

highlightColor

Specifies the highlight color. To set it, use a value either in the '#RRGGBB' format or the color name. To remove highlight color, set it to null. The returned highlight color can be in the '#RRGGBB' format, an empty string for mixed highlight colors, or null for no highlight color. Note: Only the default highlight colors are available in Office for Windows Desktop. These are "Yellow", "Lime", "Turquoise", "Pink", "Blue", "Red", "DarkBlue", "Teal", "Green", "Purple", "DarkRed", "Olive", "Gray", "LightGray", and "Black". When the add-in runs in Office for Windows Desktop, any other color is converted to the closest color when applied to the font.

italic

Specifies a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false.

name

Specifies a value that represents the name of the font.

size

Specifies a value that represents the font size in points.

strikeThrough

Specifies a value that indicates whether the font has a strikethrough. True if the font is formatted as strikethrough text, otherwise, false.

subscript

Specifies a value that indicates whether the font is a subscript. True if the font is formatted as subscript, otherwise, false.

superscript

Specifies a value that indicates whether the font is a superscript. True if the font is formatted as superscript, otherwise, false.

underline

Specifies a value that indicates the font's underline type. 'None' if the font isn't underlined.

Property Details

bold

Specifies a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false.

bold?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.1 ]

color

Specifies the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name.

color?: string;

Property Value

string

Remarks

[ API set: WordApi 1.1 ]

doubleStrikeThrough

Specifies a value that indicates whether the font has a double strikethrough. True if the font is formatted as double strikethrough text, otherwise, false.

doubleStrikeThrough?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.1 ]

hidden

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Specifies a value that indicates whether the font is tagged as hidden. True if the font is formatted as hidden text, otherwise, false.

hidden?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

highlightColor

Specifies the highlight color. To set it, use a value either in the '#RRGGBB' format or the color name. To remove highlight color, set it to null. The returned highlight color can be in the '#RRGGBB' format, an empty string for mixed highlight colors, or null for no highlight color. Note: Only the default highlight colors are available in Office for Windows Desktop. These are "Yellow", "Lime", "Turquoise", "Pink", "Blue", "Red", "DarkBlue", "Teal", "Green", "Purple", "DarkRed", "Olive", "Gray", "LightGray", and "Black". When the add-in runs in Office for Windows Desktop, any other color is converted to the closest color when applied to the font.

highlightColor?: string;

Property Value

string

Remarks

[ API set: WordApi 1.1 ]

italic

Specifies a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false.

italic?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.1 ]

name

Specifies a value that represents the name of the font.

name?: string;

Property Value

string

Remarks

[ API set: WordApi 1.1 ]

size

Specifies a value that represents the font size in points.

size?: number;

Property Value

number

Remarks

[ API set: WordApi 1.1 ]

strikeThrough

Specifies a value that indicates whether the font has a strikethrough. True if the font is formatted as strikethrough text, otherwise, false.

strikeThrough?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.1 ]

subscript

Specifies a value that indicates whether the font is a subscript. True if the font is formatted as subscript, otherwise, false.

subscript?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.1 ]

superscript

Specifies a value that indicates whether the font is a superscript. True if the font is formatted as superscript, otherwise, false.

superscript?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.1 ]

underline

Specifies a value that indicates the font's underline type. 'None' if the font isn't underlined.

underline?: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | "WaveDouble";

Property Value

Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | "WaveDouble"

Remarks

[ API set: WordApi 1.1 ]