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
BookTitle
CommentReferenceThe Annotation (Comment) Reference style.
DefaultParagraphFontThe Default Paragraph Font style.
Emphasis
EndnoteReferenceThe Endnote Reference style.
FollowedHyperlink
FootnoteReferenceThe Footnote Reference style.
HtmlAcronym
HtmlCite
HtmlCode
HtmlDefinition
HtmlKeyboard
HtmlSample
HtmlTypewriter
HtmlVariable
HyperlinkThe Hyperlink style.
IntenseEmphasis
IntenseReference
LineNumberThe Line Number style.
PageNumberThe Page Number style.
PlaceholderText
SmartLinkThe Smart Link style.
Strong
SubtleEmphasis
SubtleReference
BalloonText
BodyTextThe Body Text style.
BodyText2
BodyText3
BodyText1I
BodyText1I2
BodyTextInd
BodyTextInd2
BodyTextInd3
Closing
CommentSubject
CommentTextThe Annotation (Comment) Text style.
Date
DocumentMap
EmailSignature
EndnoteTextThe Endnote Text style.
FooterThe Footer style.
FootnoteTextThe 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.
HtmlAddress
HtmlTopOfForm
HtmlBottomOfForm
HtmlPreformatted
IntenseQuote
Macro
MessageHeader
NoteHeading
PlainText
Quote
Salutation
Signature
Subtitle
TitleThe Title style.
Bibliography
BlockText
Caption
EnvelopeAddressThe Envelope Address style.
EnvelopeReturnThe Envelope Return style.
Index1
Index2
Index3
Index4
Index5
Index6
Index7
Index8
Index9
IndexHeadingThe Index Heading style.
ListThe List style.
List2
List3
List4
List5
ListBulletThe List Bullet style.
ListBullet2
ListBullet3
ListBullet4
ListBullet5
ListContinue
ListContinue2
ListContinue3
ListContinue4
ListContinue5
ListNumberThe List Number style.
ListNumber2
ListNumber3
ListNumber4
ListNumber5
ListParagraph
NoSpacing
NormalThe Normal style.
NormalWeb
NormalIndentThe Normal Indent style.
TableOfAuthorities
TableOfFiguresThe Table of Figures style.
ToaHeading
Toc1
Toc2
Toc3
Toc4
Toc5
Toc6
Toc7
Toc8
Toc9
TocHeading
Revision
OutlineList1The 1 / a / i style.
OutlineList2The 1 / 1.1 / 1.1.1 style.
OutlineList3The Article / Section style.
NoList
ColorfulGrid
ColorfulGridAccent1
ColorfulGridAccent2
ColorfulGridAccent3
ColorfulGridAccent4
ColorfulGridAccent5
ColorfulGridAccent6
ColorfulList
ColorfulListAccent1
ColorfulListAccent2
ColorfulListAccent3
ColorfulListAccent4
ColorfulListAccent5
ColorfulListAccent6
ColorfulShading
ColorfulShadingAccent1
ColorfulShadingAccent2
ColorfulShadingAccent3
ColorfulShadingAccent4
ColorfulShadingAccent5
ColorfulShadingAccent6
DarkList
DarkListAccent1
DarkListAccent2
DarkListAccent3
DarkListAccent4
DarkListAccent5
DarkListAccent6
LightGrid
LightGridAccent1
LightGridAccent2
LightGridAccent3
LightGridAccent4
LightGridAccent5
LightGridAccent6
LightList
LightListAccent1
LightListAccent2
LightListAccent3
LightListAccent4
LightListAccent5
LightListAccent6
LightShading
LightShadingAccent1
LightShadingAccent2
LightShadingAccent3
LightShadingAccent4
LightShadingAccent5
LightShadingAccent6
MediumGrid1
MediumGrid1Accent1
MediumGrid1Accent2
MediumGrid1Accent3
MediumGrid1Accent4
MediumGrid1Accent5
MediumGrid1Accent6
MediumGrid2
MediumGrid2Accent1
MediumGrid2Accent2
MediumGrid2Accent3
MediumGrid2Accent4
MediumGrid2Accent5
MediumGrid2Accent6
MediumGrid3
MediumGrid3Accent1
MediumGrid3Accent2
MediumGrid3Accent3
MediumGrid3Accent4
MediumGrid3Accent5
MediumGrid3Accent6
MediumList1
MediumList1Accent1
MediumList1Accent2
MediumList1Accent3
MediumList1Accent4
MediumList1Accent5
MediumList1Accent6
MediumList2
MediumList2Accent1
MediumList2Accent2
MediumList2Accent3
MediumList2Accent4
MediumList2Accent5
MediumList2Accent6
MediumShading1
MediumShading1Accent1
MediumShading1Accent2
MediumShading1Accent3
MediumShading1Accent4
MediumShading1Accent5
MediumShading1Accent6
MediumShading2
MediumShading2Accent1
MediumShading2Accent2
MediumShading2Accent3
MediumShading2Accent4
MediumShading2Accent5
MediumShading2Accent6
Table3DEffects1
Table3DEffects2
Table3DEffects3
TableClassic1
TableClassic2
TableClassic3
TableClassic4
TableColorful1
TableColorful2
TableColorful3
TableColumns1
TableColumns2
TableColumns3
TableColumns4
TableColumns5
TableContemporary
TableElegant
TableGrid
TableGrid1
TableGrid2
TableGrid3
TableGrid4
TableGrid5
TableGrid6
TableGrid7
TableGrid8
TableList1
TableList2
TableList3
TableList4
TableList5
TableList6
TableList7
TableList8
TableNormal
TableProfessional
TableSimple1
TableSimple2
TableSimple3
TableSubtle1
TableSubtle2
TableTheme
TableWeb1
TableWeb2
TableWeb3
PlainTable1Plain Table 1
PlainTable2Plain Table 2
PlainTable3Plain Table 3
PlainTable4Plain Table 4
PlainTable5Plain Table 5
TableGridLightTable Grid Light
GridTable1LightGrid Table 1 Light
GridTable2Grid Table 2
GridTable3Grid Table 3
GridTable4Grid Table 4
GridTable5DarkGrid Table 5 Dark
GridTable6ColorfulGrid Table 6 Colorful
GridTable7ColorfulGrid Table 7 Colorful
GridTable1LightAccent1Grid Table 1 Light - Accent 1
GridTable2Accent1Grid Table 2 - Accent 1
GridTable3Accent1Grid Table 3 - Accent 1
GridTable4Accent1Grid Table 4 - Accent 1
GridTable5DarkAccent1Grid Table 5 Dark - Accent 1
GridTable6ColorfulAccent1Grid Table 6 Colorful - Accent 1
GridTable7ColorfulAccent1Grid Table 7 Colorful - Accent 1
GridTable1LightAccent2Grid Table 1 Light - Accent 2
GridTable2Accent2Grid Table 2 - Accent 2
GridTable3Accent2Grid Table 3 - Accent 2
GridTable4Accent2Grid Table 4 - Accent 2
GridTable5DarkAccent2Grid Table 5 Dark - Accent 2
GridTable6ColorfulAccent2Grid Table 6 Colorful - Accent 2
GridTable7ColorfulAccent2Grid Table 7 Colorful - Accent 2
GridTable1LightAccent3Grid Table 1 Light - Accent 3
GridTable2Accent3Grid Table 2 - Accent 3
GridTable3Accent3Grid Table 3 - Accent 3
GridTable4Accent3Grid Table 4 - Accent 3
GridTable5DarkAccent3Grid Table 5 Dark - Accent 3
GridTable6ColorfulAccent3Grid Table 6 Colorful - Accent 3
GridTable7ColorfulAccent3Grid Table 7 Colorful - Accent 3
GridTable1LightAccent4Grid Table 1 Light - Accent 4
GridTable2Accent4Grid Table 2 - Accent 4
GridTable3Accent4Grid Table 3 - Accent 4
GridTable4Accent4Grid Table 4 - Accent 4
GridTable5DarkAccent4Grid Table 5 Dark - Accent 4
GridTable6ColorfulAccent4Grid Table 6 Colorful - Accent 4
GridTable7ColorfulAccent4Grid Table 7 Colorful - Accent 4
GridTable1LightAccent5Grid Table 1 Light - Accent 5
GridTable2Accent5Grid Table 2 - Accent 5
GridTable3Accent5Grid Table 3 - Accent 5
GridTable4Accent5Grid Table 4 - Accent 5
GridTable5DarkAccent5Grid Table 5 Dark - Accent 5
GridTable6ColorfulAccent5Grid Table 6 Colorful - Accent 5
GridTable7ColorfulAccent5Grid Table 7 Colorful - Accent 5
GridTable1LightAccent6Grid Table 1 Light - Accent 6
GridTable2Accent6Grid Table 2 - Accent 6
GridTable3Accent6Grid Table 3 - Accent 6
GridTable4Accent6Grid Table 4 - Accent 6
GridTable5DarkAccent6Grid Table 5 Dark - Accent 6
GridTable6ColorfulAccent6Grid Table 6 Colorful - Accent 6
GridTable7ColorfulAccent6Grid Table 7 Colorful - Accent 6
ListTable1LightList Table 1 Light
ListTable2List Table 2
ListTable3List Table 3
ListTable4List Table 4
ListTable5DarkList Table 5 Dark
ListTable6ColorfulList Table 6 Colorful
ListTable7ColorfulList Table 7 Colorful
ListTable1LightAccent1List Table 1 Light - Accent 1
ListTable2Accent1List Table 2 - Accent 1
ListTable3Accent1List Table 3 - Accent 1
ListTable4Accent1List Table 4 - Accent 1
ListTable5DarkAccent1List Table 5 Dark - Accent 1
ListTable6ColorfulAccent1List Table 6 Colorful - Accent 1
ListTable7ColorfulAccent1List Table 7 Colorful - Accent 1
ListTable1LightAccent2List Table 1 Light - Accent 2
ListTable2Accent2List Table 2 - Accent 2
ListTable3Accent2List Table 3 - Accent 2
ListTable4Accent2List Table 4 - Accent 2
ListTable5DarkAccent2List Table 5 Dark - Accent 2
ListTable6ColorfulAccent2List Table 6 Colorful - Accent 2
ListTable7ColorfulAccent2List Table 7 Colorful - Accent 2
ListTable1LightAccent3List Table 1 Light - Accent 3
ListTable2Accent3List Table 2 - Accent 3
ListTable3Accent3List Table 3 - Accent 3
ListTable4Accent3List Table 4 - Accent 3
ListTable5DarkAccent3List Table 5 Dark - Accent 3
ListTable6ColorfulAccent3List Table 6 Colorful - Accent 3
ListTable7ColorfulAccent3List Table 7 Colorful - Accent 3
ListTable1LightAccent4List Table 1 Light - Accent 4
ListTable2Accent4List Table 2 - Accent 4
ListTable3Accent4List Table 3 - Accent 4
ListTable4Accent4List Table 4 - Accent 4
ListTable5DarkAccent4List Table 5 Dark - Accent 4
ListTable6ColorfulAccent4List Table 6 Colorful - Accent 4
ListTable7ColorfulAccent4List Table 7 Colorful - Accent 4
ListTable1LightAccent5List Table 1 Light - Accent 5
ListTable2Accent5List Table 2 - Accent 5
ListTable3Accent5List Table 3 - Accent 5
ListTable4Accent5List Table 4 - Accent 5
ListTable5DarkAccent5List Table 5 Dark - Accent 5
ListTable6ColorfulAccent5List Table 6 Colorful - Accent 5
ListTable7ColorfulAccent5List Table 7 Colorful - Accent 5
ListTable1LightAccent6List Table 1 Light - Accent 6
ListTable2Accent6List Table 2 - Accent 6
ListTable3Accent6List Table 3 - Accent 6
ListTable4Accent6List Table 4 - Accent 6
ListTable5DarkAccent6List Table 5 Dark - Accent 6
ListTable6ColorfulAccent6List Table 6 Colorful - Accent 6
ListTable7ColorfulAccent6List Table 7 Colorful - Accent 6
MentionThe Mention style.
SmartHyperlinkThe SmartHyperlink style.
HashtagThe Hashtag style.
UnresolvedMentionThe UnresolvedMention style.
UserA user defined style.
NilReserved for internal use.

Examples

Shows how to change the style of existing text.

let doc = new aw.Document();
let builder = new aw.DocumentBuilder(doc);

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

// 2 -  Using a built-in style identifier:
builder.font.styleIdentifier = aw.StyleIdentifier.IntenseEmphasis;
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 (let run of doc.getChildNodes(aw.NodeType.Run, true).toArray().map(node => node.asRun()))
{
  if (run.font.styleName == "Emphasis")
    run.font.styleName = "Strong";

  if (run.font.styleIdentifier == aw.StyleIdentifier.IntenseEmphasis)
    run.font.styleIdentifier = aw.StyleIdentifier.Strong;
}

doc.save(base.artifactsDir + "Font.ChangeStyle.docx");

See Also