StyleIdentifier

StyleIdentifier enumeration

Locale independent style identifier.

public enum StyleIdentifier

Values

NameValueDescription
BookTitle264
CommentReference39The Annotation (Comment) Reference style.
DefaultParagraphFont65The Default Paragraph Font style.
Emphasis88
EndnoteReference42The Endnote Reference style.
FollowedHyperlink86
FootnoteReference38The Footnote Reference style.
HtmlAcronym95
HtmlCite97
HtmlCode98
HtmlDefinition99
HtmlKeyboard100
HtmlSample102
HtmlTypewriter103
HtmlVariable104
Hyperlink85The Hyperlink style.
IntenseEmphasis261
IntenseReference263
LineNumber40The Line Number style.
PageNumber41The Page Number style.
PlaceholderText156
SmartLink371The Smart Link style.
Strong87
SubtleEmphasis260
SubtleReference262
BalloonText153
BodyText66The Body Text style.
BodyText280
BodyText381
BodyText1I77
BodyText1I278
BodyTextInd67
BodyTextInd282
BodyTextInd383
Closing63
CommentSubject106
CommentText30The Annotation (Comment) Text style.
Date76
DocumentMap89
EmailSignature91
EndnoteText43The Endnote Text style.
Footer32The Footer style.
FootnoteText29The Footnote Text style.
Header31The Header style.
Heading11The Heading 1 style.
Heading22The Heading 2 style.
Heading33The Heading 3 style.
Heading44The Heading 4 style.
Heading55The Heading 5 style.
Heading66The Heading 6 style.
Heading77The Heading 7 style.
Heading88The Heading 8 style.
Heading99The Heading 9 style.
HtmlAddress96
HtmlTopOfForm92
HtmlBottomOfForm93
HtmlPreformatted101
IntenseQuote181
Macro45
MessageHeader73
NoteHeading79
PlainText90
Quote180
Salutation75
Signature64
Subtitle74
Title62The Title style.
Bibliography265
BlockText84
Caption34
EnvelopeAddress36The Envelope Address style.
EnvelopeReturn37The Envelope Return style.
Index110
Index211
Index312
Index413
Index514
Index615
Index716
Index817
Index918
IndexHeading33The Index Heading style.
List47The List style.
List250
List351
List452
List553
ListBullet48The List Bullet style.
ListBullet254
ListBullet355
ListBullet456
ListBullet557
ListContinue68
ListContinue269
ListContinue370
ListContinue471
ListContinue572
ListNumber49The List Number style.
ListNumber258
ListNumber359
ListNumber460
ListNumber561
ListParagraph179
NoSpacing157
Normal0The Normal style.
NormalWeb94
NormalIndent28The Normal Indent style.
TableOfAuthorities44
TableOfFigures35The Table of Figures style.
ToaHeading46
Toc119
Toc220
Toc321
Toc422
Toc523
Toc624
Toc725
Toc826
Toc927
TocHeading266
Revision178
OutlineList1108The 1 / a / i style.
OutlineList2109The 1 / 1.1 / 1.1.1 style.
OutlineList3110The Article / Section style.
NoList107
ColorfulGrid171
ColorfulGridAccent1189
ColorfulGridAccent2203
ColorfulGridAccent3217
ColorfulGridAccent4231
ColorfulGridAccent5245
ColorfulGridAccent6259
ColorfulList170
ColorfulListAccent1188
ColorfulListAccent2202
ColorfulListAccent3216
ColorfulListAccent4230
ColorfulListAccent5244
ColorfulListAccent6258
ColorfulShading169
ColorfulShadingAccent1187
ColorfulShadingAccent2201
ColorfulShadingAccent3215
ColorfulShadingAccent4229
ColorfulShadingAccent5243
ColorfulShadingAccent6257
DarkList168
DarkListAccent1186
DarkListAccent2200
DarkListAccent3214
DarkListAccent4228
DarkListAccent5242
DarkListAccent6256
LightGrid160
LightGridAccent1174
LightGridAccent2192
LightGridAccent3206
LightGridAccent4220
LightGridAccent5234
LightGridAccent6248
LightList159
LightListAccent1173
LightListAccent2191
LightListAccent3205
LightListAccent4219
LightListAccent5233
LightListAccent6247
LightShading158
LightShadingAccent1172
LightShadingAccent2190
LightShadingAccent3204
LightShadingAccent4218
LightShadingAccent5232
LightShadingAccent6246
MediumGrid1165
MediumGrid1Accent1183
MediumGrid1Accent2197
MediumGrid1Accent3211
MediumGrid1Accent4225
MediumGrid1Accent5239
MediumGrid1Accent6253
MediumGrid2166
MediumGrid2Accent1184
MediumGrid2Accent2198
MediumGrid2Accent3212
MediumGrid2Accent4226
MediumGrid2Accent5240
MediumGrid2Accent6254
MediumGrid3167
MediumGrid3Accent1185
MediumGrid3Accent2199
MediumGrid3Accent3213
MediumGrid3Accent4227
MediumGrid3Accent5241
MediumGrid3Accent6255
MediumList1163
MediumList1Accent1177
MediumList1Accent2195
MediumList1Accent3209
MediumList1Accent4223
MediumList1Accent5237
MediumList1Accent6251
MediumList2164
MediumList2Accent1182
MediumList2Accent2196
MediumList2Accent3210
MediumList2Accent4224
MediumList2Accent5238
MediumList2Accent6252
MediumShading1161
MediumShading1Accent1175
MediumShading1Accent2193
MediumShading1Accent3207
MediumShading1Accent4221
MediumShading1Accent5235
MediumShading1Accent6249
MediumShading2162
MediumShading2Accent1176
MediumShading2Accent2194
MediumShading2Accent3208
MediumShading2Accent4222
MediumShading2Accent5236
MediumShading2Accent6250
Table3DEffects1142
Table3DEffects2143
Table3DEffects3144
TableClassic1114
TableClassic2115
TableClassic3116
TableClassic4117
TableColorful1118
TableColorful2119
TableColorful3120
TableColumns1121
TableColumns2122
TableColumns3123
TableColumns4124
TableColumns5125
TableContemporary145
TableElegant146
TableGrid154
TableGrid1126
TableGrid2127
TableGrid3128
TableGrid4129
TableGrid5130
TableGrid6131
TableGrid7132
TableGrid8133
TableList1134
TableList2135
TableList3136
TableList4137
TableList5138
TableList6139
TableList7140
TableList8141
TableNormal105
TableProfessional147
TableSimple1111
TableSimple2112
TableSimple3113
TableSubtle1148
TableSubtle2149
TableTheme155
TableWeb1150
TableWeb2151
TableWeb3152
PlainTable1267Plain Table 1
PlainTable2268Plain Table 2
PlainTable3269Plain Table 3
PlainTable4270Plain Table 4
PlainTable5271Plain Table 5
TableGridLight272Table Grid Light
GridTable1Light273Grid Table 1 Light
GridTable2274Grid Table 2
GridTable3275Grid Table 3
GridTable4276Grid Table 4
GridTable5Dark277Grid Table 5 Dark
GridTable6Colorful278Grid Table 6 Colorful
GridTable7Colorful279Grid Table 7 Colorful
GridTable1LightAccent1280Grid Table 1 Light - Accent 1
GridTable2Accent1281Grid Table 2 - Accent 1
GridTable3Accent1282Grid Table 3 - Accent 1
GridTable4Accent1283Grid Table 4 - Accent 1
GridTable5DarkAccent1284Grid Table 5 Dark - Accent 1
GridTable6ColorfulAccent1285Grid Table 6 Colorful - Accent 1
GridTable7ColorfulAccent1286Grid Table 7 Colorful - Accent 1
GridTable1LightAccent2287Grid Table 1 Light - Accent 2
GridTable2Accent2288Grid Table 2 - Accent 2
GridTable3Accent2289Grid Table 3 - Accent 2
GridTable4Accent2290Grid Table 4 - Accent 2
GridTable5DarkAccent2291Grid Table 5 Dark - Accent 2
GridTable6ColorfulAccent2292Grid Table 6 Colorful - Accent 2
GridTable7ColorfulAccent2293Grid Table 7 Colorful - Accent 2
GridTable1LightAccent3294Grid Table 1 Light - Accent 3
GridTable2Accent3295Grid Table 2 - Accent 3
GridTable3Accent3296Grid Table 3 - Accent 3
GridTable4Accent3297Grid Table 4 - Accent 3
GridTable5DarkAccent3298Grid Table 5 Dark - Accent 3
GridTable6ColorfulAccent3299Grid Table 6 Colorful - Accent 3
GridTable7ColorfulAccent3300Grid Table 7 Colorful - Accent 3
GridTable1LightAccent4301Grid Table 1 Light - Accent 4
GridTable2Accent4302Grid Table 2 - Accent 4
GridTable3Accent4303Grid Table 3 - Accent 4
GridTable4Accent4304Grid Table 4 - Accent 4
GridTable5DarkAccent4305Grid Table 5 Dark - Accent 4
GridTable6ColorfulAccent4306Grid Table 6 Colorful - Accent 4
GridTable7ColorfulAccent4307Grid Table 7 Colorful - Accent 4
GridTable1LightAccent5308Grid Table 1 Light - Accent 5
GridTable2Accent5309Grid Table 2 - Accent 5
GridTable3Accent5310Grid Table 3 - Accent 5
GridTable4Accent5311Grid Table 4 - Accent 5
GridTable5DarkAccent5312Grid Table 5 Dark - Accent 5
GridTable6ColorfulAccent5313Grid Table 6 Colorful - Accent 5
GridTable7ColorfulAccent5314Grid Table 7 Colorful - Accent 5
GridTable1LightAccent6315Grid Table 1 Light - Accent 6
GridTable2Accent6316Grid Table 2 - Accent 6
GridTable3Accent6317Grid Table 3 - Accent 6
GridTable4Accent6318Grid Table 4 - Accent 6
GridTable5DarkAccent6319Grid Table 5 Dark - Accent 6
GridTable6ColorfulAccent6320Grid Table 6 Colorful - Accent 6
GridTable7ColorfulAccent6321Grid Table 7 Colorful - Accent 6
ListTable1Light322List Table 1 Light
ListTable2323List Table 2
ListTable3324List Table 3
ListTable4325List Table 4
ListTable5Dark326List Table 5 Dark
ListTable6Colorful327List Table 6 Colorful
ListTable7Colorful328List Table 7 Colorful
ListTable1LightAccent1329List Table 1 Light - Accent 1
ListTable2Accent1330List Table 2 - Accent 1
ListTable3Accent1331List Table 3 - Accent 1
ListTable4Accent1332List Table 4 - Accent 1
ListTable5DarkAccent1333List Table 5 Dark - Accent 1
ListTable6ColorfulAccent1334List Table 6 Colorful - Accent 1
ListTable7ColorfulAccent1335List Table 7 Colorful - Accent 1
ListTable1LightAccent2336List Table 1 Light - Accent 2
ListTable2Accent2337List Table 2 - Accent 2
ListTable3Accent2338List Table 3 - Accent 2
ListTable4Accent2339List Table 4 - Accent 2
ListTable5DarkAccent2340List Table 5 Dark - Accent 2
ListTable6ColorfulAccent2341List Table 6 Colorful - Accent 2
ListTable7ColorfulAccent2342List Table 7 Colorful - Accent 2
ListTable1LightAccent3343List Table 1 Light - Accent 3
ListTable2Accent3344List Table 2 - Accent 3
ListTable3Accent3345List Table 3 - Accent 3
ListTable4Accent3346List Table 4 - Accent 3
ListTable5DarkAccent3347List Table 5 Dark - Accent 3
ListTable6ColorfulAccent3348List Table 6 Colorful - Accent 3
ListTable7ColorfulAccent3349List Table 7 Colorful - Accent 3
ListTable1LightAccent4350List Table 1 Light - Accent 4
ListTable2Accent4351List Table 2 - Accent 4
ListTable3Accent4352List Table 3 - Accent 4
ListTable4Accent4353List Table 4 - Accent 4
ListTable5DarkAccent4354List Table 5 Dark - Accent 4
ListTable6ColorfulAccent4355List Table 6 Colorful - Accent 4
ListTable7ColorfulAccent4356List Table 7 Colorful - Accent 4
ListTable1LightAccent5357List Table 1 Light - Accent 5
ListTable2Accent5358List Table 2 - Accent 5
ListTable3Accent5359List Table 3 - Accent 5
ListTable4Accent5360List Table 4 - Accent 5
ListTable5DarkAccent5361List Table 5 Dark - Accent 5
ListTable6ColorfulAccent5362List Table 6 Colorful - Accent 5
ListTable7ColorfulAccent5363List Table 7 Colorful - Accent 5
ListTable1LightAccent6364List Table 1 Light - Accent 6
ListTable2Accent6365List Table 2 - Accent 6
ListTable3Accent6366List Table 3 - Accent 6
ListTable4Accent6367List Table 4 - Accent 6
ListTable5DarkAccent6368List Table 5 Dark - Accent 6
ListTable6ColorfulAccent6369List Table 6 Colorful - Accent 6
ListTable7ColorfulAccent6370List Table 7 Colorful - Accent 6
Mention372The Mention style.
SmartHyperlink373The SmartHyperlink style.
Hashtag374The Hashtag style.
UnresolvedMention375The UnresolvedMention style.
User4094A user defined style.
Nil12287Reserved for internal use.

Remarks

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 User value.

Examples

Shows how to change the style of existing text.

Document doc = new Document();
DocumentBuilder builder = new 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 = 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.
foreach (Run run in doc.GetChildNodes(NodeType.Run, true))
{
    if (run.Font.StyleName == "Emphasis")
        run.Font.StyleName = "Strong";

    if (run.Font.StyleIdentifier == StyleIdentifier.IntenseEmphasis)
        run.Font.StyleIdentifier = StyleIdentifier.Strong;
}

doc.Save(ArtifactsDir + "Font.ChangeStyle.docx");

See Also