Log in

View Full Version : Search for "ea



norgro
07-30-2012, 05:54 PM
How do I modify the following code to search for "ea instead of ea ?

Dim oRng As Word.Range
Set oRng = ActiveDocument.Range
With oRng.Find
.Text = "ea"
.Wrap = wdFindStop 'stops at the end of the document
While .Execute

Wend
End With

Paul_Hossler
07-30-2012, 06:57 PM
Not tested but


Text = """ea" 'quote-quote-quote-ea-quote


doubling up a quote char inside a string puts one quote in

This would do it also


Text = chr(34) & "ea"


Paul

norgro
07-30-2012, 08:15 PM
Thanks Paul. Your helpful reply is really appreciated. I have tried both suggestions and they both work.
Norm