title: Save the cursor position in a document and return there later on
body: <p>I have a macro that scans my document for <code>Heading 1</code> styles, and consequently the cursor is moved to after the last match.</p>
  
  <p>I'm trying to capture the location of the cursor before this scan occurs, and then return to that position after it has finished. How do I do this?</p>
  
  <p>I found <a href="https://stackoverflow.com/questions/16807860/create-range-from-current-cursor-position-word-2010-vba">this answer</a> on SO, but it's not working (No error, it just doesn't do anything.)</p>
  
  <pre><code>Application.ScreenUpdating = False ' Turn screen updates off so the user will not know that the cursor has moved
  
  Dim currentPosition As Long
  currentPosition = Selection.Range.Start
  
  {... do stuff here ...}
  
  Selection.Range.Start = currentPosition
  
  Application.ScreenUpdating = True
  </code></pre>