title: How to find a value in each cell in Microsoft Word document?
body: <p>I am trying to see if I can find the value in each cell on a Microsoft Word document between pages 9 and 15. When I get to the part where I am trying to set a range to search in, the <code>Set Doc = wrdApp.Selection.Range</code> give me the error:</p>
  <blockquote>
  <p>Type Mismatch</p>
  </blockquote>
  <p>The Word document cannot be copied into Excel. The word document has to keep its formatting and someone built in some weird headers on each page with merged formatting etc.</p>
  <pre><code>Sub TFUpdate()
      Dim Wd, FinalRow, TableRow
      Dim wrdApp As Object
      Dim DoC As Range
      
      Set wrdApp = CreateObject(&quot;Word.Application&quot;)
      Set wrdDoc = wrdApp.Documents.Open(&quot;C:\Users\kimbersr\Desktop\Word Project\TF1.doc&quot;)
      wrdApp.Visible = True
      
      ThisWorkbook.Worksheets(&quot;sheet2&quot;).Activate
      
      FinalRow = Cells(Rows.Count, 1).End(xlUp).Row
      TableRow = 1
      x = 1
      
      For i = 1 To FinalRow
          part = Cells(i, 1).Value
     
      
      wrdApp.Selection.GoTo What:=1, Which:=1, Count:=9
      Set DoC = wrdApp.Selection.Range
      wrdApp.Selection.GoTo What:=wdGoToPage, Which:=wdGoToAbsolute, Count:=14
      wrdApp.DoC.End = wrdApp.Selection.Bookmarks(&quot;\Page&quot;).Range.End
      
      wrdApp.DoC.Find.Execute FindText:=&quot;14-581930L&quot;, Forward:=True
      If wrdApp.DoC.Find.Found = True Then
  
      wrdApp.DoC.Select
      
      End If
      
      Next i
  
  End Sub
  </code></pre>