Word.Interfaces.FontLoadOptions interface

Represents a font.

Remarks

[ API set: WordApi 1.1 ]

Properties

$all

Specifying $all for the LoadOptions loads all the scalar properties (e.g.: Range.address) but not the navigational properties (e.g.: Range.format.fill.color).

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

$all

Specifying $all for the LoadOptions loads all the scalar properties (e.g.: Range.address) but not the navigational properties (e.g.: Range.format.fill.color).

$all?: boolean;

Property Value

boolean

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?: boolean;

Property Value

boolean

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?: boolean;

Property Value

boolean

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?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.1 ]

size

Specifies a value that represents the font size in points.

size?: boolean;

Property Value

boolean

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?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.1 ]