title: Get text selected by ctrl+a in C# Windows Form
body: <p>When I select text by mouse in richTextBox and change its font this line works correctly:</p>
  
  <pre><code> Font NewFont = new Font(toolStripComboBox1.SelectedItem.ToString(), GetCurrentDocument.SelectionFont.Size, GetCurrentDocument.SelectionFont.Style);
  </code></pre>
  
  <p>But when selecting text by <code>ctrl+a</code> then edit it, I get an error that object reference not set to an instance of an object. How to get the text I selected by <code>ctrl+a</code>?</p>