Word.Interfaces.StyleData interface

An interface describing the data returned by calling style.toJSON().

Properties

baseStyle

Specifies the name of an existing style to use as the base formatting of another style.

borders

Specifies a BorderCollection object that represents all the borders for the specified style.

builtIn

Gets whether the specified style is a built-in style.

description

Gets the description of the specified style.

font

Gets a font object that represents the character formatting of the specified style.

inUse

Gets whether the specified style is a built-in style that has been modified or applied in the document or a new style that has been created in the document.

linked

Gets whether a style is a linked style that can be used for both paragraph and character formatting.

listTemplate

Gets a ListTemplate object that represents the list formatting for the specified Style object.

nameLocal

Gets the name of a style in the language of the user.

nextParagraphStyle

Specifies the name of the style to be applied automatically to a new paragraph that is inserted after a paragraph formatted with the specified style.

paragraphFormat

Gets a ParagraphFormat object that represents the paragraph settings for the specified style.

priority

Specifies the priority.

quickStyle

Specifies whether the style corresponds to an available quick style.

shading

Gets a Shading object that represents the shading for the specified style. Not applicable to List style.

tableStyle

Gets a TableStyle object representing Style properties that can be applied to a table.

type

Gets the style type.

unhideWhenUsed

Specifies whether the specified style is made visible as a recommended style in the Styles and in the Styles task pane in Microsoft Word after it's used in the document.

visibility

Specifies whether the specified style is visible as a recommended style in the Styles gallery and in the Styles task pane.

Property Details

baseStyle

Specifies the name of an existing style to use as the base formatting of another style.

baseStyle?: string;

Property Value

string

Remarks

[ API set: WordApi 1.5 ]

Note: The ability to set baseStyle was introduced in WordApi 1.6.

borders

Specifies a BorderCollection object that represents all the borders for the specified style.

borders?: Word.Interfaces.BorderData[];

Property Value

Remarks

[ API set: WordApiDesktop 1.1 ]

builtIn

Gets whether the specified style is a built-in style.

builtIn?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.5 ]

description

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.

Gets the description of the specified style.

description?: string;

Property Value

string

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

font

Gets a font object that represents the character formatting of the specified style.

font?: Word.Interfaces.FontData;

Property Value

Remarks

[ API set: WordApi 1.5 ]

inUse

Gets whether the specified style is a built-in style that has been modified or applied in the document or a new style that has been created in the document.

inUse?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.5 ]

linked

Gets whether a style is a linked style that can be used for both paragraph and character formatting.

linked?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.5 ]

listTemplate

Gets a ListTemplate object that represents the list formatting for the specified Style object.

listTemplate?: Word.Interfaces.ListTemplateData;

Property Value

Remarks

[ API set: WordApiDesktop 1.1 ]

nameLocal

Gets the name of a style in the language of the user.

nameLocal?: string;

Property Value

string

Remarks

[ API set: WordApi 1.5 ]

nextParagraphStyle

Specifies the name of the style to be applied automatically to a new paragraph that is inserted after a paragraph formatted with the specified style.

nextParagraphStyle?: string;

Property Value

string

Remarks

[ API set: WordApi 1.5 ]

Note: The ability to set nextParagraphStyle was introduced in WordApi 1.6.

paragraphFormat

Gets a ParagraphFormat object that represents the paragraph settings for the specified style.

paragraphFormat?: Word.Interfaces.ParagraphFormatData;

Property Value

Remarks

[ API set: WordApi 1.5 ]

priority

Specifies the priority.

priority?: number;

Property Value

number

Remarks

[ API set: WordApi 1.5 ]

quickStyle

Specifies whether the style corresponds to an available quick style.

quickStyle?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.5 ]

shading

Gets a Shading object that represents the shading for the specified style. Not applicable to List style.

shading?: Word.Interfaces.ShadingData;

Property Value

Remarks

[ API set: WordApi 1.6 ]

tableStyle

Gets a TableStyle object representing Style properties that can be applied to a table.

tableStyle?: Word.Interfaces.TableStyleData;

Property Value

Remarks

[ API set: WordApi 1.6 ]

type

Gets the style type.

type?: Word.StyleType | "Character" | "List" | "Paragraph" | "Table";

Property Value

Word.StyleType | "Character" | "List" | "Paragraph" | "Table"

Remarks

[ API set: WordApi 1.5 ]

unhideWhenUsed

Specifies whether the specified style is made visible as a recommended style in the Styles and in the Styles task pane in Microsoft Word after it's used in the document.

unhideWhenUsed?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.5 ]

visibility

Specifies whether the specified style is visible as a recommended style in the Styles gallery and in the Styles task pane.

visibility?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.5 ]