title: Selection member methods
body: <p>I am trying to write code that:</p>
  
  <ol>
  <li>Finds/locates specific strings that appear in the first column of tables in a Word document.</li>
  <li>Maps these strings to the immediate headings of the tables that they appear in.</li>
  <li>List out the string-heading mappings in an Excel spreadsheet.
  Caveat: All of the strings the VBA code will look for are listed under an existing Excel spreadsheet.</li>
  </ol>
  
  <p>So far, I have been able to figure out #1 and #3 fairly easily. I figured #2 will need to use of the Selection class. I have been trying to familiarize myself with it but I am having a lot of trouble. For example, I have written a simple subroutine that resets the selection cursor to the beginning of a word document. This sub is called from a main sub in an Excel VBA. </p>
  
  <pre><code>Private Sub FindHeadings()
      Set wrdApp = CreateObject("Word.Application")
      wrdApp.Visible = True
      Set wrdDoc = wrdApp.Documents.Open("C:/Users/c11145/Desktop/SSDD_Trace/Test3.docx")
  
      'wrdDoc.Selection.HomeKey Unit:=wdStory
  
      Selection.HomeKey Unit:=wdStory
  End Sub
  </code></pre>
  
  <p>I am getting Run-time error "438": Object doesn't support this property or method.</p>
  
  <p>I have also tried:</p>
  
  <pre><code>Dim sel As Selection
  sel.HomeKey Unit:=wdStory
  </code></pre>
  
  <p>But I get Run-time error 91.</p>