Returning the count of Find/Replace in a macro

  • Thread starter Charlie''s Word VBA questions
  • Start date
C

Charlie''s Word VBA questions

When you do a Find/Replace from the menu, Word tells the number of replaced
occurrences. In a macro, how can I determine the number of replaced strings?
Find.Replace does not seem to have any way to return the actual count of
replacements. Any ideas?

Thanks for your help,
Charlie
 
J

Jonathan West

"Charlie''s Word VBA questions"
When you do a Find/Replace from the menu, Word tells the number of
replaced
occurrences. In a macro, how can I determine the number of replaced
strings?
Find.Replace does not seem to have any way to return the actual count of
replacements. Any ideas?

Thanks for your help,
Charlie

How to find out, using VBA, how many replacements Word made during a Find &
Replace All
http://www.word.mvps.org/FAQs/MacrosVBA/GetNoOfReplacements.htm


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
 
C

Charlie''s Word VBA questions

Thank you very much, Jonathan. Simple is beautiful. I am finding and
replacing a symbol only, but I think that shouldn't make a difference.
 

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