Partager via


UndoRecord.StartCustomRecord Method (Word)

Initiates the creation of a custom undo record.

Version Information

Version Added: Word 2010

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.

NoteNote
If this parameter is omitted or is an empty string, Word 2010 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

Concepts

Working with the UndoRecord Object

UndoRecord Object

UndoRecord Object Members