Hi James,
You can use the following to get a list of all the styles that you have
actually used in a document:
Dim oSty As Style
Dim oStylesInUse As String
Selection.HomeKey Unit:=wdStory
For Each oSty In ActiveDocument.Styles
If oSty.InUse And oSty.NameLocal <> "Default Paragraph Font" Then
With Selection.Find
.ClearFormatting
.Text = ""
.Style = oSty.NameLocal
If .Execute Then
oStylesInUse = oStylesInUse & oSty.NameLocal & vbCrLf
Selection.HomeKey Unit:=wdStory
End If
End With
End If
Next oSty
MsgBox oStylesInUse
You can invoke the dialog box and have the document "highlight" the found
items, as in using the Task Pane to "Select All nn instances", but then you
need to figure out a way to make the routine stop on that Style. That is,
this doesn't really work the way you want for ALL styles. You'd have to know
a single style you were looking for, as in the following:
Selection.HomeKey Unit:=wdStory
Selection.Find.Style = "Heading 1"
With Dialogs(wdDialogEditFind)
.Format = True
SendKeys "%t%f{ESC}"
.Show
End With
HTH,
Dave