Styles used IN a document

N

Nick Lee

Hi,
Can anybody tell me how to show a list of Styles that are ACTUALLY IN USE in
an Office 2000 Word document? The use of ‘Format / Style / List / Styles in
use’, shows both Styles actually in the document, plus Styles which are
available for use in the document.
Thanks,
 
C

Cooz

Hi Nick,

This macro produces a message box with all paragraph styles used in the
document:

Sub StyleList()
Dim aPar As Paragraph, strStyleList As String

strStyleList = ""

For Each aPar In ActiveDocument.Paragraphs
If InStr(strStyleList, aPar.Style & Chr(13)) = 0 Then
strStyleList = strStyleList & aPar.Style & Chr(13)
End If
Next

MsgBox strStyleList

End Sub

Success,
Cooz
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top