D
Duas Quartunciae
I am trying to use the find object to find text matching format of
other text.
I thought I could do that just by (for example)
selection.find.font = activedocument.range(12,13).font
This does not find anything. It does not find the characters I used as
a basis for identifying the font to search for.
With Selection.Find
.ClearFormatting
.Font = ActiveDocument.Range(12, 13).Font
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchKashida = False
.MatchDiacritics = False
.MatchAlefHamza = False
.MatchControl = False
.MatchByte = False
.CorrectHangulEndings = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = False
.MatchFuzzy = False
.Execute
If Not .Found Then
MsgBox "Find fails"
End If
End With
On the other hand, if I set selection.find.font.bold = true, or
something of the kind, it will find bolded text.
Is it possible to just set a font on the find object from some other
font object, and then search for matching formats?
Cheers -- Chris
other text.
I thought I could do that just by (for example)
selection.find.font = activedocument.range(12,13).font
This does not find anything. It does not find the characters I used as
a basis for identifying the font to search for.
With Selection.Find
.ClearFormatting
.Font = ActiveDocument.Range(12, 13).Font
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchKashida = False
.MatchDiacritics = False
.MatchAlefHamza = False
.MatchControl = False
.MatchByte = False
.CorrectHangulEndings = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = False
.MatchFuzzy = False
.Execute
If Not .Found Then
MsgBox "Find fails"
End If
End With
On the other hand, if I set selection.find.font.bold = true, or
something of the kind, it will find bolded text.
Is it possible to just set a font on the find object from some other
font object, and then search for matching formats?
Cheers -- Chris