Log in

View Full Version : Undo Stack



Jfp87
03-02-2017, 05:25 AM
Guys,

Does anyone know of a method to accomplish one of the following:

1. Stop an action going to the built-in undo stack (e.g. being able to select a word and apply bold formatting but not have it show in the undo stack as 'Bold').

2. Delete an item from the built-in undo stack.

I've searched the net but there doesn't seem to be any obvious way to do any of the above. I am aware of creating custom undo records but it is specifically one of the above points I need a solution to. The only other option I can see is creating a completely custom undo stack, which I was hoping to avoid.

Joe

Paul_Hossler
03-03-2017, 08:25 AM
Only thing I know is the document.UnDoClear, which might not be enough for your needs


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



This method corresponds to the list of items that appears when you click the arrow beside the Undo button on the Standard toolbar. Include this method at the end of a macro to keep Visual Basic actions from appearing in the Undo box (for example, "VBA-Selection.InsertAfter").

Jfp87
03-04-2017, 10:49 AM
Thanks Paul. I will look further into that. Like you said, not sure if it will be enough.

Joe