我想找到一个段落是否为斜体,我通过for循环迭代到所有段落,如果段落是斜体,我想做一些操作。
For Each oPara In .Paragraphs
With oPara
If oParaAttrItalic = True Then
.Style = "new_style"
End If
End With
Next
答案 0 :(得分:1)
您需要使用Paragraph.Range参考
Dim oPara As Paragraph
For Each oPara In ActiveDocument.Paragraphs
If oPara.Range.Font.Italic = True Then
'Do something
End If
Next oPara