Document.EndCustomUndoAction Method
Publisher Developer Reference |
Specifies the endpoint of a group of actions that are wrapped to create a single undo action. The BeginCustomUndoAction Method method is used to specify the starting point and label (textual description) of the actions used to create the single undo action. The wrapped group of actions can be undone with a single undo.
Syntax
expression.EndCustomUndoAction
expression A variable that represents a Document object.
Remarks
The BeginCustomUndoAction method must be called before the EndCustomUndoAction method is called. A run-time error is returned if EndCustomUndoAction is called before BeginCustomUndoAction.
Example
The following example contains two custom undo actions. The first one is created on page four of the active publication. The BeginCustomUndoAction method is used to specify the point at which the custom undo action should begin. Six individual actions are performed, and then they are wrapped into one action with the call to EndCustomUndoAction.
The text in the text frame that was created within the first custom undo action is then tested to determine whether the font is Verdana. If not, the Undo Method method is called with UndoActionsAvailable passed as a parameter. In this case there is only one undo action available. So, the call to Undo will undo only one action, but this one action has wrapped six actions into one.
A second undo action is then created, and it could also be undone later with a single undo operation.
This example assumes that the active publication contains at least four pages.
Visual Basic for Applications |
---|
|
See Also