Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / July 2005

Tip: Looking for answers? Try searching our database.

Returning the count of Find/Replace in a macro

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Charlie''s Word VBA questions - 18 Jul 2005 18:21 GMT
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
Jonathan West - 18 Jul 2005 18:38 GMT
> When you do a Find/Replace from the menu, Word tells the number of
> replaced
[quoted text clipped - 5 lines]
> 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

Signature

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 

Charlie''s Word VBA questions - 20 Jul 2005 18:15 GMT
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.

> > When you do a Find/Replace from the menu, Word tells the number of
> > replaced
[quoted text clipped - 9 lines]
> Replace All
> http://www.word.mvps.org/FAQs/MacrosVBA/GetNoOfReplacements.htm
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.