StyleIdentifier enumeration

StyleIdentifier enumeration

Locale independent style identifier.

The names of built-in styles in MS Word are localized for different languages. Using a style identifier you can find the correct style regardless of the document language.

All user defined styles are assigned the StyleIdentifier.USER value.

Members

Name Description
BOOK_TITLE
COMMENT_REFERENCE The Annotation (Comment) Reference style.
DEFAULT_PARAGRAPH_FONT The Default Paragraph Font style.
EMPHASIS
ENDNOTE_REFERENCE The Endnote Reference style.
FOLLOWED_HYPERLINK
FOOTNOTE_REFERENCE The Footnote Reference style.
HTML_ACRONYM
HTML_CITE
HTML_CODE
HTML_DEFINITION
HTML_KEYBOARD
HTML_SAMPLE
HTML_TYPEWRITER
HTML_VARIABLE
HYPERLINK The Hyperlink style.
INTENSE_EMPHASIS
INTENSE_REFERENCE
LINE_NUMBER The Line Number style.
PAGE_NUMBER The Page Number style.
PLACEHOLDER_TEXT
SMART_LINK The Smart Link style.
STRONG
SUBTLE_EMPHASIS
SUBTLE_REFERENCE
BALLOON_TEXT
BODY_TEXT The Body Text style.
BODY_TEXT2
BODY_TEXT3
BODY_TEXT1_I
BODY_TEXT1_I2
BODY_TEXT_IND
BODY_TEXT_IND2
BODY_TEXT_IND3
CLOSING
COMMENT_SUBJECT
COMMENT_TEXT The Annotation (Comment) Text style.
DATE
DOCUMENT_MAP
EMAIL_SIGNATURE
ENDNOTE_TEXT The Endnote Text style.
FOOTER The Footer style.
FOOTNOTE_TEXT The Footnote Text style.
HEADER The Header style.
HEADING1 The Heading 1 style.
HEADING2 The Heading 2 style.
HEADING3 The Heading 3 style.
HEADING4 The Heading 4 style.
HEADING5 The Heading 5 style.
HEADING6 The Heading 6 style.
HEADING7 The Heading 7 style.
HEADING8 The Heading 8 style.
HEADING9 The Heading 9 style.
HTML_ADDRESS
HTML_TOP_OF_FORM
HTML_BOTTOM_OF_FORM
HTML_PREFORMATTED
INTENSE_QUOTE
MACRO
MESSAGE_HEADER
NOTE_HEADING
PLAIN_TEXT
QUOTE
SALUTATION
SIGNATURE
SUBTITLE
TITLE The Title style.
BIBLIOGRAPHY
BLOCK_TEXT
CAPTION
ENVELOPE_ADDRESS The Envelope Address style.
ENVELOPE_RETURN The Envelope Return style.
INDEX1
INDEX2
INDEX3
INDEX4
INDEX5
INDEX6
INDEX7
INDEX8
INDEX9
INDEX_HEADING The Index Heading style.
LIST The List style.
LIST2
LIST3
LIST4
LIST5
LIST_BULLET The List Bullet style.
LIST_BULLET2
LIST_BULLET3
LIST_BULLET4
LIST_BULLET5
LIST_CONTINUE
LIST_CONTINUE2
LIST_CONTINUE3
LIST_CONTINUE4
LIST_CONTINUE5
LIST_NUMBER The List Number style.
LIST_NUMBER2
LIST_NUMBER3
LIST_NUMBER4
LIST_NUMBER5
LIST_PARAGRAPH
NO_SPACING
NORMAL The Normal style.
NORMAL_WEB
NORMAL_INDENT The Normal Indent style.
TABLE_OF_AUTHORITIES
TABLE_OF_FIGURES The Table of Figures style.
TOA_HEADING
TOC1
TOC2
TOC3
TOC4
TOC5
TOC6
TOC7
TOC8
TOC9
TOC_HEADING
REVISION
OUTLINE_LIST1 The 1 / a / i style.
OUTLINE_LIST2 The 1 / 1.1 / 1.1.1 style.
OUTLINE_LIST3 The Article / Section style.
NO_LIST
COLORFUL_GRID
COLORFUL_GRID_ACCENT1
COLORFUL_GRID_ACCENT2
COLORFUL_GRID_ACCENT3
COLORFUL_GRID_ACCENT4
COLORFUL_GRID_ACCENT5
COLORFUL_GRID_ACCENT6
COLORFUL_LIST
COLORFUL_LIST_ACCENT1
COLORFUL_LIST_ACCENT2
COLORFUL_LIST_ACCENT3
COLORFUL_LIST_ACCENT4
COLORFUL_LIST_ACCENT5
COLORFUL_LIST_ACCENT6
COLORFUL_SHADING
COLORFUL_SHADING_ACCENT1
COLORFUL_SHADING_ACCENT2
COLORFUL_SHADING_ACCENT3
COLORFUL_SHADING_ACCENT4
COLORFUL_SHADING_ACCENT5
COLORFUL_SHADING_ACCENT6
DARK_LIST
DARK_LIST_ACCENT1
DARK_LIST_ACCENT2
DARK_LIST_ACCENT3
DARK_LIST_ACCENT4
DARK_LIST_ACCENT5
DARK_LIST_ACCENT6
LIGHT_GRID
LIGHT_GRID_ACCENT1
LIGHT_GRID_ACCENT2
LIGHT_GRID_ACCENT3
LIGHT_GRID_ACCENT4
LIGHT_GRID_ACCENT5
LIGHT_GRID_ACCENT6
LIGHT_LIST
LIGHT_LIST_ACCENT1
LIGHT_LIST_ACCENT2
LIGHT_LIST_ACCENT3
LIGHT_LIST_ACCENT4
LIGHT_LIST_ACCENT5
LIGHT_LIST_ACCENT6
LIGHT_SHADING
LIGHT_SHADING_ACCENT1
LIGHT_SHADING_ACCENT2
LIGHT_SHADING_ACCENT3
LIGHT_SHADING_ACCENT4
LIGHT_SHADING_ACCENT5
LIGHT_SHADING_ACCENT6
MEDIUM_GRID1
MEDIUM_GRID1_ACCENT1
MEDIUM_GRID1_ACCENT2
MEDIUM_GRID1_ACCENT3
MEDIUM_GRID1_ACCENT4
MEDIUM_GRID1_ACCENT5
MEDIUM_GRID1_ACCENT6
MEDIUM_GRID2
MEDIUM_GRID2_ACCENT1
MEDIUM_GRID2_ACCENT2
MEDIUM_GRID2_ACCENT3
MEDIUM_GRID2_ACCENT4
MEDIUM_GRID2_ACCENT5
MEDIUM_GRID2_ACCENT6
MEDIUM_GRID3
MEDIUM_GRID3_ACCENT1
MEDIUM_GRID3_ACCENT2
MEDIUM_GRID3_ACCENT3
MEDIUM_GRID3_ACCENT4
MEDIUM_GRID3_ACCENT5
MEDIUM_GRID3_ACCENT6
MEDIUM_LIST1
MEDIUM_LIST1_ACCENT1
MEDIUM_LIST1_ACCENT2
MEDIUM_LIST1_ACCENT3
MEDIUM_LIST1_ACCENT4
MEDIUM_LIST1_ACCENT5
MEDIUM_LIST1_ACCENT6
MEDIUM_LIST2
MEDIUM_LIST2_ACCENT1
MEDIUM_LIST2_ACCENT2
MEDIUM_LIST2_ACCENT3
MEDIUM_LIST2_ACCENT4
MEDIUM_LIST2_ACCENT5
MEDIUM_LIST2_ACCENT6
MEDIUM_SHADING1
MEDIUM_SHADING1_ACCENT1
MEDIUM_SHADING1_ACCENT2
MEDIUM_SHADING1_ACCENT3
MEDIUM_SHADING1_ACCENT4
MEDIUM_SHADING1_ACCENT5
MEDIUM_SHADING1_ACCENT6
MEDIUM_SHADING2
MEDIUM_SHADING2_ACCENT1
MEDIUM_SHADING2_ACCENT2
MEDIUM_SHADING2_ACCENT3
MEDIUM_SHADING2_ACCENT4
MEDIUM_SHADING2_ACCENT5
MEDIUM_SHADING2_ACCENT6
TABLE_3D_EFFECTS1
TABLE_3D_EFFECTS2
TABLE_3D_EFFECTS3
TABLE_CLASSIC1
TABLE_CLASSIC2
TABLE_CLASSIC3
TABLE_CLASSIC4
TABLE_COLORFUL1
TABLE_COLORFUL2
TABLE_COLORFUL3
TABLE_COLUMNS1
TABLE_COLUMNS2
TABLE_COLUMNS3
TABLE_COLUMNS4
TABLE_COLUMNS5
TABLE_CONTEMPORARY
TABLE_ELEGANT
TABLE_GRID
TABLE_GRID1
TABLE_GRID2
TABLE_GRID3
TABLE_GRID4
TABLE_GRID5
TABLE_GRID6
TABLE_GRID7
TABLE_GRID8
TABLE_LIST1
TABLE_LIST2
TABLE_LIST3
TABLE_LIST4
TABLE_LIST5
TABLE_LIST6
TABLE_LIST7
TABLE_LIST8
TABLE_NORMAL
TABLE_PROFESSIONAL
TABLE_SIMPLE1
TABLE_SIMPLE2
TABLE_SIMPLE3
TABLE_SUBTLE1
TABLE_SUBTLE2
TABLE_THEME
TABLE_WEB1
TABLE_WEB2
TABLE_WEB3
PLAIN_TABLE1 Plain Table 1
PLAIN_TABLE2 Plain Table 2
PLAIN_TABLE3 Plain Table 3
PLAIN_TABLE4 Plain Table 4
PLAIN_TABLE5 Plain Table 5
TABLE_GRID_LIGHT Table Grid Light
GRID_TABLE1_LIGHT Grid Table 1 Light
GRID_TABLE2 Grid Table 2
GRID_TABLE3 Grid Table 3
GRID_TABLE4 Grid Table 4
GRID_TABLE5_DARK Grid Table 5 Dark
GRID_TABLE6_COLORFUL Grid Table 6 Colorful
GRID_TABLE7_COLORFUL Grid Table 7 Colorful
GRID_TABLE1_LIGHT_ACCENT1 Grid Table 1 Light - Accent 1
GRID_TABLE2_ACCENT1 Grid Table 2 - Accent 1
GRID_TABLE3_ACCENT1 Grid Table 3 - Accent 1
GRID_TABLE4_ACCENT1 Grid Table 4 - Accent 1
GRID_TABLE5_DARK_ACCENT1 Grid Table 5 Dark - Accent 1
GRID_TABLE6_COLORFUL_ACCENT1 Grid Table 6 Colorful - Accent 1
GRID_TABLE7_COLORFUL_ACCENT1 Grid Table 7 Colorful - Accent 1
GRID_TABLE1_LIGHT_ACCENT2 Grid Table 1 Light - Accent 2
GRID_TABLE2_ACCENT2 Grid Table 2 - Accent 2
GRID_TABLE3_ACCENT2 Grid Table 3 - Accent 2
GRID_TABLE4_ACCENT2 Grid Table 4 - Accent 2
GRID_TABLE5_DARK_ACCENT2 Grid Table 5 Dark - Accent 2
GRID_TABLE6_COLORFUL_ACCENT2 Grid Table 6 Colorful - Accent 2
GRID_TABLE7_COLORFUL_ACCENT2 Grid Table 7 Colorful - Accent 2
GRID_TABLE1_LIGHT_ACCENT3 Grid Table 1 Light - Accent 3
GRID_TABLE2_ACCENT3 Grid Table 2 - Accent 3
GRID_TABLE3_ACCENT3 Grid Table 3 - Accent 3
GRID_TABLE4_ACCENT3 Grid Table 4 - Accent 3
GRID_TABLE5_DARK_ACCENT3 Grid Table 5 Dark - Accent 3
GRID_TABLE6_COLORFUL_ACCENT3 Grid Table 6 Colorful - Accent 3
GRID_TABLE7_COLORFUL_ACCENT3 Grid Table 7 Colorful - Accent 3
GRID_TABLE1_LIGHT_ACCENT4 Grid Table 1 Light - Accent 4
GRID_TABLE2_ACCENT4 Grid Table 2 - Accent 4
GRID_TABLE3_ACCENT4 Grid Table 3 - Accent 4
GRID_TABLE4_ACCENT4 Grid Table 4 - Accent 4
GRID_TABLE5_DARK_ACCENT4 Grid Table 5 Dark - Accent 4
GRID_TABLE6_COLORFUL_ACCENT4 Grid Table 6 Colorful - Accent 4
GRID_TABLE7_COLORFUL_ACCENT4 Grid Table 7 Colorful - Accent 4
GRID_TABLE1_LIGHT_ACCENT5 Grid Table 1 Light - Accent 5
GRID_TABLE2_ACCENT5 Grid Table 2 - Accent 5
GRID_TABLE3_ACCENT5 Grid Table 3 - Accent 5
GRID_TABLE4_ACCENT5 Grid Table 4 - Accent 5
GRID_TABLE5_DARK_ACCENT5 Grid Table 5 Dark - Accent 5
GRID_TABLE6_COLORFUL_ACCENT5 Grid Table 6 Colorful - Accent 5
GRID_TABLE7_COLORFUL_ACCENT5 Grid Table 7 Colorful - Accent 5
GRID_TABLE1_LIGHT_ACCENT6 Grid Table 1 Light - Accent 6
GRID_TABLE2_ACCENT6 Grid Table 2 - Accent 6
GRID_TABLE3_ACCENT6 Grid Table 3 - Accent 6
GRID_TABLE4_ACCENT6 Grid Table 4 - Accent 6
GRID_TABLE5_DARK_ACCENT6 Grid Table 5 Dark - Accent 6
GRID_TABLE6_COLORFUL_ACCENT6 Grid Table 6 Colorful - Accent 6
GRID_TABLE7_COLORFUL_ACCENT6 Grid Table 7 Colorful - Accent 6
LIST_TABLE1_LIGHT List Table 1 Light
LIST_TABLE2 List Table 2
LIST_TABLE3 List Table 3
LIST_TABLE4 List Table 4
LIST_TABLE5_DARK List Table 5 Dark
LIST_TABLE6_COLORFUL List Table 6 Colorful
LIST_TABLE7_COLORFUL List Table 7 Colorful
LIST_TABLE1_LIGHT_ACCENT1 List Table 1 Light - Accent 1
LIST_TABLE2_ACCENT1 List Table 2 - Accent 1
LIST_TABLE3_ACCENT1 List Table 3 - Accent 1
LIST_TABLE4_ACCENT1 List Table 4 - Accent 1
LIST_TABLE5_DARK_ACCENT1 List Table 5 Dark - Accent 1
LIST_TABLE6_COLORFUL_ACCENT1 List Table 6 Colorful - Accent 1
LIST_TABLE7_COLORFUL_ACCENT1 List Table 7 Colorful - Accent 1
LIST_TABLE1_LIGHT_ACCENT2 List Table 1 Light - Accent 2
LIST_TABLE2_ACCENT2 List Table 2 - Accent 2
LIST_TABLE3_ACCENT2 List Table 3 - Accent 2
LIST_TABLE4_ACCENT2 List Table 4 - Accent 2
LIST_TABLE5_DARK_ACCENT2 List Table 5 Dark - Accent 2
LIST_TABLE6_COLORFUL_ACCENT2 List Table 6 Colorful - Accent 2
LIST_TABLE7_COLORFUL_ACCENT2 List Table 7 Colorful - Accent 2
LIST_TABLE1_LIGHT_ACCENT3 List Table 1 Light - Accent 3
LIST_TABLE2_ACCENT3 List Table 2 - Accent 3
LIST_TABLE3_ACCENT3 List Table 3 - Accent 3
LIST_TABLE4_ACCENT3 List Table 4 - Accent 3
LIST_TABLE5_DARK_ACCENT3 List Table 5 Dark - Accent 3
LIST_TABLE6_COLORFUL_ACCENT3 List Table 6 Colorful - Accent 3
LIST_TABLE7_COLORFUL_ACCENT3 List Table 7 Colorful - Accent 3
LIST_TABLE1_LIGHT_ACCENT4 List Table 1 Light - Accent 4
LIST_TABLE2_ACCENT4 List Table 2 - Accent 4
LIST_TABLE3_ACCENT4 List Table 3 - Accent 4
LIST_TABLE4_ACCENT4 List Table 4 - Accent 4
LIST_TABLE5_DARK_ACCENT4 List Table 5 Dark - Accent 4
LIST_TABLE6_COLORFUL_ACCENT4 List Table 6 Colorful - Accent 4
LIST_TABLE7_COLORFUL_ACCENT4 List Table 7 Colorful - Accent 4
LIST_TABLE1_LIGHT_ACCENT5 List Table 1 Light - Accent 5
LIST_TABLE2_ACCENT5 List Table 2 - Accent 5
LIST_TABLE3_ACCENT5 List Table 3 - Accent 5
LIST_TABLE4_ACCENT5 List Table 4 - Accent 5
LIST_TABLE5_DARK_ACCENT5 List Table 5 Dark - Accent 5
LIST_TABLE6_COLORFUL_ACCENT5 List Table 6 Colorful - Accent 5
LIST_TABLE7_COLORFUL_ACCENT5 List Table 7 Colorful - Accent 5
LIST_TABLE1_LIGHT_ACCENT6 List Table 1 Light - Accent 6
LIST_TABLE2_ACCENT6 List Table 2 - Accent 6
LIST_TABLE3_ACCENT6 List Table 3 - Accent 6
LIST_TABLE4_ACCENT6 List Table 4 - Accent 6
LIST_TABLE5_DARK_ACCENT6 List Table 5 Dark - Accent 6
LIST_TABLE6_COLORFUL_ACCENT6 List Table 6 Colorful - Accent 6
LIST_TABLE7_COLORFUL_ACCENT6 List Table 7 Colorful - Accent 6
MENTION The Mention style.
SMART_HYPERLINK The SmartHyperlink style.
HASHTAG The Hashtag style.
UNRESOLVED_MENTION The UnresolvedMention style.
USER A user defined style.
NIL Reserved for internal use.

Examples

Shows how to change the style of existing text.

doc = aw.Document()
builder = aw.DocumentBuilder(doc)

# Below are two ways of referencing styles.
# 1 -  Using the style name:
builder.font.style_name = "Emphasis"
builder.writeln("Text originally in \"Emphasis\" style")

# 2 -  Using a built-in style identifier:
builder.font.style_identifier = aw.StyleIdentifier.INTENSE_EMPHASIS
builder.writeln("Text originally in \"Intense Emphasis\" style")

# Convert all uses of one style to another,
# using the above methods to reference old and new styles.
for run in doc.get_child_nodes(aw.NodeType.RUN, True):
    run = run.as_run()

    if run.font.style_name == "Emphasis":
        run.font.style_name = "Strong"

    if run.font.style_identifier == aw.StyleIdentifier.INTENSE_EMPHASIS:
        run.font.style_identifier = aw.StyleIdentifier.STRONG

doc.save(ARTIFACTS_DIR + "Font.change_style.docx")

See Also