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

NameDescription
BOOK_TITLE
COMMENT_REFERENCEThe Annotation (Comment) Reference style.
DEFAULT_PARAGRAPH_FONTThe Default Paragraph Font style.
EMPHASIS
ENDNOTE_REFERENCEThe Endnote Reference style.
FOLLOWED_HYPERLINK
FOOTNOTE_REFERENCEThe Footnote Reference style.
HTML_ACRONYM
HTML_CITE
HTML_CODE
HTML_DEFINITION
HTML_KEYBOARD
HTML_SAMPLE
HTML_TYPEWRITER
HTML_VARIABLE
HYPERLINKThe Hyperlink style.
INTENSE_EMPHASIS
INTENSE_REFERENCE
LINE_NUMBERThe Line Number style.
PAGE_NUMBERThe Page Number style.
PLACEHOLDER_TEXT
SMART_LINKThe Smart Link style.
STRONG
SUBTLE_EMPHASIS
SUBTLE_REFERENCE
BALLOON_TEXT
BODY_TEXTThe 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_TEXTThe Annotation (Comment) Text style.
DATE
DOCUMENT_MAP
EMAIL_SIGNATURE
ENDNOTE_TEXTThe Endnote Text style.
FOOTERThe Footer style.
FOOTNOTE_TEXTThe Footnote Text style.
HEADERThe Header style.
HEADING1The Heading 1 style.
HEADING2The Heading 2 style.
HEADING3The Heading 3 style.
HEADING4The Heading 4 style.
HEADING5The Heading 5 style.
HEADING6The Heading 6 style.
HEADING7The Heading 7 style.
HEADING8The Heading 8 style.
HEADING9The 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
TITLEThe Title style.
BIBLIOGRAPHY
BLOCK_TEXT
CAPTION
ENVELOPE_ADDRESSThe Envelope Address style.
ENVELOPE_RETURNThe Envelope Return style.
INDEX1
INDEX2
INDEX3
INDEX4
INDEX5
INDEX6
INDEX7
INDEX8
INDEX9
INDEX_HEADINGThe Index Heading style.
LISTThe List style.
LIST2
LIST3
LIST4
LIST5
LIST_BULLETThe List Bullet style.
LIST_BULLET2
LIST_BULLET3
LIST_BULLET4
LIST_BULLET5
LIST_CONTINUE
LIST_CONTINUE2
LIST_CONTINUE3
LIST_CONTINUE4
LIST_CONTINUE5
LIST_NUMBERThe List Number style.
LIST_NUMBER2
LIST_NUMBER3
LIST_NUMBER4
LIST_NUMBER5
LIST_PARAGRAPH
NO_SPACING
NORMALThe Normal style.
NORMAL_WEB
NORMAL_INDENTThe Normal Indent style.
TABLE_OF_AUTHORITIES
TABLE_OF_FIGURESThe Table of Figures style.
TOA_HEADING
TOC1
TOC2
TOC3
TOC4
TOC5
TOC6
TOC7
TOC8
TOC9
TOC_HEADING
REVISION
OUTLINE_LIST1The 1 / a / i style.
OUTLINE_LIST2The 1 / 1.1 / 1.1.1 style.
OUTLINE_LIST3The 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_TABLE1Plain Table 1
PLAIN_TABLE2Plain Table 2
PLAIN_TABLE3Plain Table 3
PLAIN_TABLE4Plain Table 4
PLAIN_TABLE5Plain Table 5
TABLE_GRID_LIGHTTable Grid Light
GRID_TABLE1_LIGHTGrid Table 1 Light
GRID_TABLE2Grid Table 2
GRID_TABLE3Grid Table 3
GRID_TABLE4Grid Table 4
GRID_TABLE5_DARKGrid Table 5 Dark
GRID_TABLE6_COLORFULGrid Table 6 Colorful
GRID_TABLE7_COLORFULGrid Table 7 Colorful
GRID_TABLE1_LIGHT_ACCENT1Grid Table 1 Light - Accent 1
GRID_TABLE2_ACCENT1Grid Table 2 - Accent 1
GRID_TABLE3_ACCENT1Grid Table 3 - Accent 1
GRID_TABLE4_ACCENT1Grid Table 4 - Accent 1
GRID_TABLE5_DARK_ACCENT1Grid Table 5 Dark - Accent 1
GRID_TABLE6_COLORFUL_ACCENT1Grid Table 6 Colorful - Accent 1
GRID_TABLE7_COLORFUL_ACCENT1Grid Table 7 Colorful - Accent 1
GRID_TABLE1_LIGHT_ACCENT2Grid Table 1 Light - Accent 2
GRID_TABLE2_ACCENT2Grid Table 2 - Accent 2
GRID_TABLE3_ACCENT2Grid Table 3 - Accent 2
GRID_TABLE4_ACCENT2Grid Table 4 - Accent 2
GRID_TABLE5_DARK_ACCENT2Grid Table 5 Dark - Accent 2
GRID_TABLE6_COLORFUL_ACCENT2Grid Table 6 Colorful - Accent 2
GRID_TABLE7_COLORFUL_ACCENT2Grid Table 7 Colorful - Accent 2
GRID_TABLE1_LIGHT_ACCENT3Grid Table 1 Light - Accent 3
GRID_TABLE2_ACCENT3Grid Table 2 - Accent 3
GRID_TABLE3_ACCENT3Grid Table 3 - Accent 3
GRID_TABLE4_ACCENT3Grid Table 4 - Accent 3
GRID_TABLE5_DARK_ACCENT3Grid Table 5 Dark - Accent 3
GRID_TABLE6_COLORFUL_ACCENT3Grid Table 6 Colorful - Accent 3
GRID_TABLE7_COLORFUL_ACCENT3Grid Table 7 Colorful - Accent 3
GRID_TABLE1_LIGHT_ACCENT4Grid Table 1 Light - Accent 4
GRID_TABLE2_ACCENT4Grid Table 2 - Accent 4
GRID_TABLE3_ACCENT4Grid Table 3 - Accent 4
GRID_TABLE4_ACCENT4Grid Table 4 - Accent 4
GRID_TABLE5_DARK_ACCENT4Grid Table 5 Dark - Accent 4
GRID_TABLE6_COLORFUL_ACCENT4Grid Table 6 Colorful - Accent 4
GRID_TABLE7_COLORFUL_ACCENT4Grid Table 7 Colorful - Accent 4
GRID_TABLE1_LIGHT_ACCENT5Grid Table 1 Light - Accent 5
GRID_TABLE2_ACCENT5Grid Table 2 - Accent 5
GRID_TABLE3_ACCENT5Grid Table 3 - Accent 5
GRID_TABLE4_ACCENT5Grid Table 4 - Accent 5
GRID_TABLE5_DARK_ACCENT5Grid Table 5 Dark - Accent 5
GRID_TABLE6_COLORFUL_ACCENT5Grid Table 6 Colorful - Accent 5
GRID_TABLE7_COLORFUL_ACCENT5Grid Table 7 Colorful - Accent 5
GRID_TABLE1_LIGHT_ACCENT6Grid Table 1 Light - Accent 6
GRID_TABLE2_ACCENT6Grid Table 2 - Accent 6
GRID_TABLE3_ACCENT6Grid Table 3 - Accent 6
GRID_TABLE4_ACCENT6Grid Table 4 - Accent 6
GRID_TABLE5_DARK_ACCENT6Grid Table 5 Dark - Accent 6
GRID_TABLE6_COLORFUL_ACCENT6Grid Table 6 Colorful - Accent 6
GRID_TABLE7_COLORFUL_ACCENT6Grid Table 7 Colorful - Accent 6
LIST_TABLE1_LIGHTList Table 1 Light
LIST_TABLE2List Table 2
LIST_TABLE3List Table 3
LIST_TABLE4List Table 4
LIST_TABLE5_DARKList Table 5 Dark
LIST_TABLE6_COLORFULList Table 6 Colorful
LIST_TABLE7_COLORFULList Table 7 Colorful
LIST_TABLE1_LIGHT_ACCENT1List Table 1 Light - Accent 1
LIST_TABLE2_ACCENT1List Table 2 - Accent 1
LIST_TABLE3_ACCENT1List Table 3 - Accent 1
LIST_TABLE4_ACCENT1List Table 4 - Accent 1
LIST_TABLE5_DARK_ACCENT1List Table 5 Dark - Accent 1
LIST_TABLE6_COLORFUL_ACCENT1List Table 6 Colorful - Accent 1
LIST_TABLE7_COLORFUL_ACCENT1List Table 7 Colorful - Accent 1
LIST_TABLE1_LIGHT_ACCENT2List Table 1 Light - Accent 2
LIST_TABLE2_ACCENT2List Table 2 - Accent 2
LIST_TABLE3_ACCENT2List Table 3 - Accent 2
LIST_TABLE4_ACCENT2List Table 4 - Accent 2
LIST_TABLE5_DARK_ACCENT2List Table 5 Dark - Accent 2
LIST_TABLE6_COLORFUL_ACCENT2List Table 6 Colorful - Accent 2
LIST_TABLE7_COLORFUL_ACCENT2List Table 7 Colorful - Accent 2
LIST_TABLE1_LIGHT_ACCENT3List Table 1 Light - Accent 3
LIST_TABLE2_ACCENT3List Table 2 - Accent 3
LIST_TABLE3_ACCENT3List Table 3 - Accent 3
LIST_TABLE4_ACCENT3List Table 4 - Accent 3
LIST_TABLE5_DARK_ACCENT3List Table 5 Dark - Accent 3
LIST_TABLE6_COLORFUL_ACCENT3List Table 6 Colorful - Accent 3
LIST_TABLE7_COLORFUL_ACCENT3List Table 7 Colorful - Accent 3
LIST_TABLE1_LIGHT_ACCENT4List Table 1 Light - Accent 4
LIST_TABLE2_ACCENT4List Table 2 - Accent 4
LIST_TABLE3_ACCENT4List Table 3 - Accent 4
LIST_TABLE4_ACCENT4List Table 4 - Accent 4
LIST_TABLE5_DARK_ACCENT4List Table 5 Dark - Accent 4
LIST_TABLE6_COLORFUL_ACCENT4List Table 6 Colorful - Accent 4
LIST_TABLE7_COLORFUL_ACCENT4List Table 7 Colorful - Accent 4
LIST_TABLE1_LIGHT_ACCENT5List Table 1 Light - Accent 5
LIST_TABLE2_ACCENT5List Table 2 - Accent 5
LIST_TABLE3_ACCENT5List Table 3 - Accent 5
LIST_TABLE4_ACCENT5List Table 4 - Accent 5
LIST_TABLE5_DARK_ACCENT5List Table 5 Dark - Accent 5
LIST_TABLE6_COLORFUL_ACCENT5List Table 6 Colorful - Accent 5
LIST_TABLE7_COLORFUL_ACCENT5List Table 7 Colorful - Accent 5
LIST_TABLE1_LIGHT_ACCENT6List Table 1 Light - Accent 6
LIST_TABLE2_ACCENT6List Table 2 - Accent 6
LIST_TABLE3_ACCENT6List Table 3 - Accent 6
LIST_TABLE4_ACCENT6List Table 4 - Accent 6
LIST_TABLE5_DARK_ACCENT6List Table 5 Dark - Accent 6
LIST_TABLE6_COLORFUL_ACCENT6List Table 6 Colorful - Accent 6
LIST_TABLE7_COLORFUL_ACCENT6List Table 7 Colorful - Accent 6
MENTIONThe Mention style.
SMART_HYPERLINKThe SmartHyperlink style.
HASHTAGThe Hashtag style.
UNRESOLVED_MENTIONThe UnresolvedMention style.
USERA user defined style.
NILReserved 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