Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #12  
Old 02-19-2025, 11:33 PM
Ddadoo57 Ddadoo57 is offline problem with capturing group in findText/ReplaceWith Windows 11 problem with capturing group in findText/ReplaceWith Office 2021
Advanced Beginner
problem with capturing group in findText/ReplaceWith
 
Join Date: Feb 2023
Posts: 90
Ddadoo57 is on a distinguished road
Default

No, no, I didn't ignore your suggestion, I tested it right away but it didn't work in my vba code.
Now I've just tried it again, I didn't set the revision tracking again, but it gives nothing, no replacement is made.

I've just run several tests in Word with Ctrl+H and this is what I get:
- if I remove the track changes and the cursor isn't between the ... and the H (Hi...|Hello!) the capture and replacement works fine. If it's between the ... and the H, nothing is found and replaced.
- if I leave the modification tracker on, the replacement is nonsense (HiHello...!).

So we can probably deduce that track changes have something to do with it, but I don't know how to do anything more in my code than use :

Code:
            
            objDoc.TrackRevisions = false 'Not objDoc.TrackRevisions
            objDoc.AcceptAllRevisions
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with capturing group in findText/ReplaceWith Find and Replace not capturing entire line Steve Kunkel Word VBA 7 04-22-2021 10:00 AM
problem with capturing group in findText/ReplaceWith Capturing numbered headings jbvalen Word VBA 5 05-04-2017 05:03 PM
problem with capturing group in findText/ReplaceWith Capturing Redirected URL with macro souravkp Word VBA 1 07-11-2015 09:34 PM
problem with capturing group in findText/ReplaceWith Capturing addresses into contacts lordnacho Outlook 1 11-01-2010 06:05 PM
time capturing aligahk06 Excel 0 04-18-2010 11:53 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:53 PM.


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