Sub Test5()
Dim myFont As Font, myParFormat As ParagraphFormat
'仅字符
Set myFont = ActiveDocument.Content.Font
'判断是否有字符边框
If myFont.Borders.OutsideLineStyle > 0 Then
MsgBox "文档中有字符边框"
'判断是否有字符底纹
ElseIf myFont.Shading.Texture <> wdTextureNone Then
MsgBox "文档中有字符底纹"
End If
'段落格式
Set myParFormat = ActiveDocument.Content.ParagraphFormat
'判断是否有段落边框
If myParFormat.Borders.OutsideLineStyle > 0 Then
MsgBox "文档中有段落边框"
'判断是否有段落底纹
ElseIf myParFormat.Shading.Texture <> wdTextureNone Then
MsgBox "文档中有段落底纹"
End If
End Sub 作者: 小菜 时间: 2010-7-21 13:33
代码格式错乱,看着太费劲了