Article ID: 140742
Article Last Modified on 8/17/2005
Sub MAIN
ScreenUpdating 0 ' turn off screen noise
a = CountStyles() ' get # of styles, assign to
' variable
For x = 1 To a ' begin loop
sn$ = StyleName$(x)
FormatFont .Bold = 1 ' format style name as bold
FormatParagraph .KeepWithNext = 1 ' and keep it with style
' definition text
Insert StyleName$(x) + Chr$(13) ' insert style name
FormatParagraph .KeepWithNext = 0 ' turn off Keep with Next
FormatFont .Bold = 0 ' turn off bold formatting
Insert StyleDesc$(sn$) + String$(2, 13) ' insert style definition
Next ' go back for the next one
StartOfDocument ' go to top of document
End Sub
For additional information regarding the CountStyles() function, click
Microsoft Word Help Topics on the Help menu, and see the "CountStyles()
function" topic.
Additional query words: count styles macro definitions 7.0 word95 countstyles word7 winword
Keywords: KB140742