Do I take it that you are trying to replace the spaces in the two
strings with non-breaking spaces (as indicated by your code snippet,
but not your question?)
Are these strings always together? Does the first part always have
the same number of letters digits and spaces? Are the two strings
separated by a line feed of a paragraph? You will need to provide
more information, but to get you started see
http://www.gmayor.com/replace_using_wildcards.htm Given that you have
run two dates together I will assume that these
strings have nothing to do with one another. You can find dates with
([0-9]{1,2}) ([ADFJMNOS][a-z]{2,}) ([0-9]{4})
replace with
\1^0160\2^0160\3
(set wildcard switch)
The simple string is easier. If the strings are always the same
length, search for
([A-Z]{4}) ([0-9]{2}) ([0-9]{3}) ([0-9]{3}) ([0-9]{3})
replace with
\1^0160\2^0160\3^0160\4
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site
www.gmayor.com
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Ann Marie wrote:
I have bookmark code to find non breaking space and convert. But how
do I set search string in Find - looking for serach string::
ASDN 12 123 123 123
19 July 2008 12 December 2007
So I can do find and replace all.
ActiveDocument.Bookmarks(1).Range.Find.Execute _
Findtext:=" ", _
ReplaceWith:="^s", _
Replace:=wdReplaceAll