If the control is named rchDocument (which I think it is), then the syntax would be:
If you change the control's name to contentsRichTextBox, then the code would be:
Basically it's whatever the control's name is followed by ".Undo();"
When you start typing "contents," IntelliSense should list the control.
If you can't remember the control's name (for example, in a larger program that you haven't looked at for a while), try typing "RichTextBox" and see if IntelliSense can list it for you.
Keep me posted.