UndoClear Method
TOC
Collapse the table of content
Expand the table of content

Document.UndoClear Method (Word)

Office 2013 and later
GitHub-Mark-64px

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

Clears the list of actions that can be undone for the specified document.

expression .UndoClear

expression Required. A variable that represents a Document object.

This method corresponds to the list of items that appears when you click the arrow beside the Undo button on the Standard toolbar. Include this method at the end of a macro to keep Visual Basic actions from appearing in the Undo box (for example, "VBA-Selection.InsertAfter").

This example clears the list of actions that can be undone for the active document.

ActiveDocument.UndoClear
Show:
© 2016 Microsoft