PDA

View Full Version : Capturing the Undo Stack



dmarkfie
01-22-2008, 02:58 PM
Am looking for a way to capture the undo stack. What I want to do is to then export it to a log file for error trapping. If I can figure out where it is and how to capture it, the output part is simple.

rory
01-22-2008, 03:21 PM
What information exactly are you looking to capture? It is not exposed in VBA but you might be able to read the Undo items off the menu bar if that helps?

dmarkfie
01-22-2008, 03:23 PM
will look into. am trying to capture the list of undo items that you see when you click on undo items. will look at properties of command bars - see what i can find

rory
01-22-2008, 03:32 PM
For example:
Dim ctl As CommandBarControl
Set ctl = Application.CommandBars("Standard").Controls("Undo")
Debug.Print ctl.List(4)

HTH