Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 07-28-2020, 05:55 PM
Guessed's Avatar
Guessed Guessed is offline How to loop through content controls; if has text and has track changes, then accept Windows 10 How to loop through content controls; if has text and has track changes, then accept Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,185
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

Don't overthink it if you are going to accept them all anyway. Accepting revisions when there are no revisions is faster than testing to see if there are revisions before accepting.
Code:
Sub AcceptCCTracks()
  Dim aCC As ContentControl, aRng As Range
  For Each aRng In ActiveDocument.StoryRanges
    For Each aCC In aRng.ContentControls
      aCC.Range.Revisions.AcceptAll
    Next aCC
  Next aRng
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Loop through controls, make certain controls invisible MacroWizard Word VBA 2 11-10-2015 02:36 PM
Loop and Update Content Controls with value vss712 Word VBA 7 08-27-2015 08:56 PM
How to loop through content controls; if has text and has track changes, then accept Rich text/Plain text Content Controls in Template michael.fisher5 Word 9 11-19-2014 06:36 AM
How to loop through content controls; if has text and has track changes, then accept Moving between Rich text content controls Sammie0Sue Word 4 03-12-2014 01:43 AM
How to loop through content controls; if has text and has track changes, then accept Rich Text Content Controls: Formatting? tinfanide Word VBA 8 03-04-2013 04:15 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:17 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