T
Tony Logan
I have a document where there's an unknown amount of text that is font x (x
being Arial, or Times, or whatever). This text will sometimes include
paragraph marks.
I want to select all the text that is font x and stop selecting as soon as I
get to a font that isn't x.
I thought the below code would do the trick, but instead I'm getting caught
in an endless loop. Any ideas? Thanks.
code (assumes the cursor is at the first character of font x):
With Selection
.ExtendMode = True
Do Until Selection.Font.Name <> "Arial"
.MoveRight Unit:=wdCharacter
Loop
End With
being Arial, or Times, or whatever). This text will sometimes include
paragraph marks.
I want to select all the text that is font x and stop selecting as soon as I
get to a font that isn't x.
I thought the below code would do the trick, but instead I'm getting caught
in an endless loop. Any ideas? Thanks.
code (assumes the cursor is at the first character of font x):
With Selection
.ExtendMode = True
Do Until Selection.Font.Name <> "Arial"
.MoveRight Unit:=wdCharacter
Loop
End With