Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-05-2020, 03:24 AM
John 4 John 4 is offline Return number of changes a "Replace-All" makes, without using a loop? Windows 10 Return number of changes a "Replace-All" makes, without using a loop? Office 2013
Advanced Beginner
Return number of changes a "Replace-All" makes, without using a loop?
 
Join Date: Oct 2019
Posts: 69
John 4 is on a distinguished road
Default Return number of changes a "Replace-All" makes, without using a loop?


When i use Find-and-Replace to do a "Replace-All", Word tells me how many changes were made. Can i access that number or get it returned when doing a VBA Replace-All, instead of using "Replace-One", a loop, and a counter?

Thanks for your help.

Last edited by John 4; 12-05-2020 at 06:10 AM.
Reply With Quote
  #2  
Old 12-05-2020, 09:38 AM
VBorNotVB VBorNotVB is offline Return number of changes a "Replace-All" makes, without using a loop? Mac OS X Return number of changes a "Replace-All" makes, without using a loop? Office 2016 for Mac
Novice
 
Join Date: Oct 2018
Location: Southern California
Posts: 25
VBorNotVB is on a distinguished road
Default

I think this link answers your question:
How to find out, using VBA, how many replacements Word made during a Find
& Replace All
Reply With Quote
  #3  
Old 12-07-2020, 03:03 AM
John 4 John 4 is offline Return number of changes a "Replace-All" makes, without using a loop? Windows 10 Return number of changes a "Replace-All" makes, without using a loop? Office 2013
Advanced Beginner
Return number of changes a "Replace-All" makes, without using a loop?
 
Join Date: Oct 2019
Posts: 69
John 4 is on a distinguished road
Default

Thanks VB, surprisingly complex for such a seemingly simple task, but at least my question's answered.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to merge empty cells before "ok" with a for loop Iput Word VBA 5 09-08-2019 06:10 PM
Return number of changes a "Replace-All" makes, without using a loop? Don't want if statement to return "false" mbesspiata Excel 2 06-06-2016 02:29 PM
Replace "comma" with "and" in line of text audioman Word VBA 7 01-21-2016 03:11 PM
Spreadsheet with "CR" & "DB" in amount & number columns. bfisher Excel 4 09-28-2015 07:03 AM
Return number of changes a "Replace-All" makes, without using a loop? Mailing: how to make the "page number" in Word is the same as "row number" in excel w Jamal NUMAN Word 1 09-03-2011 11:37 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:46 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft