Document.Redo Method
Publisher Developer Reference |
Redoes the last action or a specified number of actions. Corresponds to the list of items that appears when you click the arrow beside the Redo button on the Standard toolbar. Calling this method reverses the Undo Method method.
Syntax
expression.Redo(Count)
expression A variable that represents a Document object.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
Count | Optional | Long | Specifies the number of actions to be redone. Default is 1, meaning that if omitted, only the last action will be redone. |
Return Value
Nothing
Remarks
If called when there are no actions on the redo stack, or when Count is greater than the number of actions that currently reside on the stack, the Redo method will redo as many actions as possible and ignore the rest.
The maximum number of actions that can be redone in one call to Redo is 20.
Example
The following example uses the Redo method to redo a subset of the actions that were undone using the Undo method.
Part 1 creates a rectangle that contains a text frame on the fourth page of the active publication. Various font properties are set, and text is added to the text frame. In this case, the text "This font is Courier" is set to 12 point bold Courier font.
Part 2 tests whether the text in the text frame is Verdana font. If not, then the Undo method is used to undo the last four actions on the undo stack. The Redo method is then used to redo the the first two of the last four actions that were just undone. In this case, the third action (setting the font size) and the fourth action (setting the font to bold) are redone. The font name is then changed to Verdana, and the text is modified.
Visual Basic for Applications |
---|
|
See Also