UndoRecord.EndCustomRecord method (Word)

Completes the creation of a custom undo record.

Syntax

expression. EndCustomRecord

expression A variable that represents an 'UndoRecord' object.

Remarks

You use the UndoRecord.StartCustomRecord to initiate the creation of a custom undo record. To complete the creation of a custom undo record, you use the EndCustomRecord method.

Example

The following code example creates a custom undo record.

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.