need a way to FIND and INSERT, not REPLACE

C

Connie

I am trying to create a macro to find and insert a "special character" without changing the current text. Example: I have a list of names, addresses and SSN's. I was able to create a macro that would FIND: SSN and REPLACE with a paragraph mark. However, I now have a name without a SSN.

Is there a way to FIND: "State" "Zip Code" and if "SSN" does not appear after "Zip Code", insert "special character" after the "Zip Code" without changing any text?
 
H

Helmut Weber

Hi Connie,
seems to be possible, though your description of the
task is not too precise. What code have you got, so far?
In principle, you search (whatever),
check whether (whatever) was found and
start an action, depending on whether
"found" returned "true" or "false".
Like that:
while selection.find.found
selection.range.insertafter " hohoho."
selection.find.execute
wend
Greetings from Bavaria, Germany
Helmut Weber
"red.sys" & chr$(64) & "t-online.de"
Word 97, W98
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top