UndoRecord.StartCustomRecord method (Word)

Initiates the creation of a custom undo record.

Syntax

expression. StartCustomRecord( _Name_ )

expression A variable that represents an 'UndoRecord' object.

Parameters

Name Required/Optional Data type Description
Name Optional String Specifies the name of the custom undo record. This string is limited to 64 characters. If a longer string is supplied, the string is truncated to 64 characters.

Note

If this parameter is omitted or is an empty string, Word uses the name of the first command executed as the name of the undo record.

|

Remarks

StartCustomRecord begins the creation of a custom undo record, which records all actions done to the application while it is active under a record defined by Name.

Example

Sub TestUndo() 
Dim objUndo As UndoRecord 
 
Set objUndo = Application.UndoRecord 
objUndo.StartCustomRecord ("My Custom Undo") 
    'Add some actions here 
objUndo.EndCustomRecord 
     
End Sub

See also

UndoRecord Object

Working with the UndoRecord Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.