Find code is not working in some word lines
Good day! I beg your patience:
I made a code in (word VBA) to search for the letter ':' and then do something (like Bold format)
the code is working perfect in tables. BUT in a normal text, if there's two ':' in the same line, the full line is excluded from the action.
Example:
Before Code:
Name:
Nationality:
Address: City:
ID No.:
After Code:
Name:
Nationality:
Address: City:
ID No.:
as you see, in the line starting with: Address, no effect at all
Here's the code:
Dim bWC As Boolean
Dim oRng As Word.range
Set oRng = ActiveDocument.range
With oRng.Find
.MatchWildcards = True
.Text = ":"
.Format = True
.Wrap = wdFindStop
While .Execute
oRng.Select
............
|