Showing results for 
Search instead for 
Did you mean: 
Showing results for 
Search instead for 
Did you mean: 

Accepting all tracked changes using ACL


Accepting all tracked changes using ACL

Hello Adepters,

I've written an ACL script to accept all changes in a document, using change_tracking_accept_change(). It works, but the problem is that for some changes, it pops up a message box that says: "Accepting this change will remove nested changes. Continue with the accept?"

As far as I can tell, using my script (clicking 'yes' to all the above messages) and using the built-in functionality in Tools > Change Tracking > Accept or Reject Changes produces an identical document.

So I have two questions: (1) Is there a better, built-in way to programatically accept all tracked changes in a document? and (2) Is there a way to suppress the message boxes in my ACL script?

Here's the script:

function accept_all_changes()

#array of change-tracking tags
local tags[9]
tags[1] = "atict:add"
tags[2] = "atict:del"
tags[3] = "atict:addm"
tags[4] = "atict:delm"
tags[5] = "atict:chgm"
tags[6] = "atict:join1"
tags[7] = "atict:join2"
tags[8] = "atict:split1"
tags[9] = "atict:aplit2"

$document = oid_root()

#loop through each change-tracking tag
for ($i=1; $i <= 9; $i++) {
$num = oid_find_children($document, $arr, $tags[$i])
for ($j=1; $j <= $num; $j++) {




Try taking the function for the accept all changes in the Epic menu and run if from the command line. See how it works and if it does, 'borrow' it rather than yours (unless you need to have some other functionality in which case, just make the Epic function a sub function of yours).
-----jsulak <> wrote: -----

To: <>

You'll find the guts of Epic's Accept All that Lynn mentions in \packages\main\_chgtrk.acl, but a quicker way to do it is with the write command:

write -ct changesapplied "$mynewdoc";

where $mynewdoc is a new version of your file.

- Lou

Lou Argyres
Continuing Education of the Bar - California
300 Frank Ogawa Plaza, Suite 410
Oakland, CA 94612