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