Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Don't add changes made via VBA to the undo history

I have a set of Word macro's that format documents that are sent to from an external source. Usually there are a lot of changes made to the document, all of which are recorded in the undo history, which I don't want.

Is there a way to not add all of these changes to the undo history, but rather just add one undo action that will undo everything the macros have done? Thanks.

like image 498
David Gard Avatar asked Oct 05 '22 01:10

David Gard


1 Answers

This is not available for Word 2007 or earlier. The UndoRecord object was added in Word 2010 and lets you "clump" actions made in VBA into a single UndoRecord, to which a custom "label" for the Undo list can be assigned. The Undo actions can be nested at various levels. More than one UndoRecord object can be created. More information is available in the MSDN documentation

https://msdn.microsoft.com/en-us/library/office/ff821168(v=office.14).aspx

like image 70
Cindy Meister Avatar answered Oct 10 '22 03:10

Cindy Meister