title: How to Undo and Redo in C# (Rich Text Box)
body: <p>I've been trying to get <strong>undo</strong> and <strong>redo</strong> working in my text editor for about 3 days now. It's doing my head in.</p>
  
  <p>I have a text box (named <code>richTextBoxPrintCtrl1</code>), which I would like to be able to <strong>undo</strong> and *<em>redo *</em>(word by word).</p>
  
  <p>So if I click the <strong>undo</strong> button, it <em>undoes</em> the last word. And if I then clicked the <strong>redo</strong> button, it <em>redoes</em> the last word.</p>
  
  <p>Could somebody help me get this working? </p>
  
  <p><code>richTextBoxPrintCtrl1.Undo();</code> doesn't work very well. It deletes everything typed in the text box.</p>
  
  <p>Thanks in advance for your help.</p>
  
  <p>I know this question has been asked many times before, but I can't get it working using the information from the questions I've browsed here on SO.</p>