Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
We use ACL COM commands com_attach etc. to open Word files and run Word macros. (Arbortext 6.0M050 64-bit; Win 7)
# open named word file and run macro: h - Word COM handle; docsh - Documents collection; doch - doc to open[; docapp - Application property; docapprun - Application.Run macro method]
h=com_attach('Word.Application');
com_prop_put(h, 'Visible', -1);
com_call(h,"Activate");
docsh = com_prop_get(h, 'Documents');
doch = com_call(docsh, 'Open', word_doc);
if (word_macro) {
docapp = com_prop_get(doch, 'Application');
docapprun = com_call(docapp, 'Run', word_macro);
}
com_release(h);
}
Process is (1) "write" 2 versions of a file with Tracked Changes (-ct changesapplied | original); (2) XSL transforms 2 versions to WordML (Word 2003 XML Document) format files; (3) open 1st Word file and (3) run macro that compares it to reject-all "original" version (believe me, you don't want to write an XSL that transforms <atict:> tags to WordML). Result files showing Tracked Changes are sent to outside authors/reviewers who don't have Arbortext.
Lou Argyres
CEB / Continuing Education of the Bar
510-302-2097 | lou.argyres@ceb.ucla.edu | ceb.com
UNIVERSITY OF CALIFORNIA - STATE BAR OF CALIFORNIA