listing which documents were changed by macro

P

paul

I have a macro which goes through hundreds of documents
and changes old product names to new product names. This
uses Word's find and replace functions. After the macro
is finished, I would like to have a list of which
documents were changed and which were not. I have to
redistribute hard copies of the documents that were
changed, so I don't want to worry about the documents that
were not changed.

Is there a way to know whether a find/replace search for a
document made any changes or not? Thanks.
 
C

Cindy M -WordMVP-

Hi Paul,
I have a macro which goes through hundreds of documents
and changes old product names to new product names. This
uses Word's find and replace functions. After the macro
is finished, I would like to have a list of which
documents were changed and which were not. I have to
redistribute hard copies of the documents that were
changed, so I don't want to worry about the documents that
were not changed.

Is there a way to know whether a find/replace search for a
document made any changes or not?
Are you using ReplaceAll or is your macro looping through
Find/Replace and doing other things when something is found?

Generally, though, now that I think about it, the .Found
property should be set to TRUE in either case. So I'd say
check the value of Find.Found and if it's true, add this
document to your list.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep
30 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any follow
question or reply in the newsgroup and not by e-mail :)
 

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