A family of Microsoft presentation graphics products that offer tools for creating presentations and adding graphic effects like multimedia objects and special effects with text.
In VBA... in 2010, you can use Application.StartNewUndoEntry to start a new entry in the undo stack. But in 2007 we have to use this work around:
If you do something using Application.Commandbars.ExceuteMso("...") then a new entry is created in the undo stack. If you don't want that action to appear in the undo stack, you can undo it with
Application.Commandbars.ExceuteMso("Undo")
A new stack entry will then be left for whatever the code does after calling the undo.
To get the string to include within the brackets, add a command to the QAT, then in the customize the QAT window, hover over it and you will see the string in brackets.
Which command to use will depend on what you are doing - obviously the command button has to be enabled to be able to press it.
So if you have a shape selected, you could use:
Application.CommandBars.ExecuteMso ("ObjectFlipHorizontal")
Application.CommandBars.ExecuteMso ("Undo")
but if you have text selected, you could use
Application.CommandBars.ExecuteMso ("Bold")
Application.CommandBars.ExecuteMso ("Undo")
You can test what is selected with If ActiveWindow.Selection.Type = .... Then
Alternatively, you can have your code create a shape and select it, flip and undo, then delete it.
Hope that makes sense.
Cheers
Rich