expression.InUse
expression Required. An expression that returns a Style object.
Remarks
This property doesn't necessarily indicate whether the style is currently applied to any text in the document. For instance, if text that's been formatted with a style is deleted, the InUse property of the style remains True. For built-in styles that have never been used in the document, this property returns False.
Example
This example displays a message box that lists the names of all the styles that are currently being used in the active document.
Dim docActive As Document Dim strMessage As String Dim styleLoop As Style Set docActive = ActiveDocumentstrMessage= "Styles in use:" & vbCr For Each styleLoop IndocActive.Styles If styleLoop.InUse = True Then WithdocActive.Content.Find .ClearFormatting .Text = "" .Style = styleLoop .Execute Format:=True If .Found = True ThenstrMessage=strMessage& styleLoop.Name & vbCr End If End With End If Next styleLoop MsgBoxstrMessage