0
我有一个范围。在这个范围内是一些文字。现在我可以用vba检测某个特定的stlye - 比方说Heading1 - 是否在这个范围内?Word,VBA:编程范围内的某种风格的检查
我有一个范围。在这个范围内是一些文字。现在我可以用vba检测某个特定的stlye - 比方说Heading1 - 是否在这个范围内?Word,VBA:编程范围内的某种风格的检查
,这是可能与Selection.Find
方法
mySelection.Find.ClearFormatting
mySelection.Find.Style = ActiveDocument.Styles("Heading 1")
With mySelection.Find
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchByte = False
.CorrectHangulEndings = False
.HanjaPhoneticHangul = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = False
.MatchFuzzy = False
End With
mySelection.Find.Execute