Reputation: 89
I want to find if a paragraph is italics or not, i am iterating to all paragraph through a for loop, if the paragraph is italics i want to do some operation.
For Each oPara In .Paragraphs
With oPara
If oParaAttrItalic = True Then
.Style = "new_style"
End If
End With
Next
Upvotes: 2
Views: 1161
Reputation: 1643
You need to use the Paragraph.Range reference
Dim oPara As Paragraph
For Each oPara In ActiveDocument.Paragraphs
If oPara.Range.Font.Italic = True Then
'Do something
End If
Next oPara
Upvotes: 1