Table of Contents

Class BuiltInStyles

Namespace
DocWright.Dom.Editing
Assembly
DocWright.Dom.dll

Word's definitions of its built-in styles, as Word for Microsoft 365 adds them to a document that uses one for the first time (read with tools/Probe-WordBuiltInStyles.ps1, WQ-0106): the headings, Title, Subtitle, the quotes, List Paragraph, No Spacing, Caption and the character styles of the Styles gallery. ApplyBuiltInStyle(WordDocument, DocumentSpan, string) applies one by name, adding it when the document has none of that name.

public static class BuiltInStyles
Inheritance
BuiltInStyles
Inherited Members

Remarks

The definitions are Word's own, not those of its new-document template (whose Heading 1 is 20 pt): they are what a document that does not carry them gets. A definition refers to Word's ids Normal and DefaultParagraphFont; colours are theme colours, with the RGB Word writes for the Office theme.

Properties

Names

Gets the names of the styles in the library, as Word writes them (heading 1 and caption in lower case).

Methods

Contains(string)

Gets whether the library has a style of the name, compared as Word compares style names (ignoring case).

Find(string)

A copy of Word's definition of a built-in style.

IsWordStyleName(string)

Gets whether Word treats a style of the name as one of its own built-in styles, compared ignoring case: the 376 names Word lists in a document's latent styles (heading 1, annotation text, Table Grid), far more than this library defines. Word recognises a built-in style by its name, not by w:customStyle, and does not delete one (WQ-0109).