title: Extracting specific MS word tables into Excel
body: <p>I have a report that is imported into word. It has fields (which remain the same for each report), each in their own table on the left that correspond to values (which change per report) on the right. The objective is to place these corresponding values to excel in a single row. The problem I am having is identifying the field tables and than moving the cursor to the right and selecting the value in the corresponding table. Right now I am manipulating another script which allows the user to select a cell, run the script, choose the file, locates the field table, selects the table to the right, copies value into excel. All tables are 1x1 cells, due to how the software imports into word.      </p>
  
  <pre><code>Sub GrabUsage()
  Dim FName As String, FD As FileDialog
  Dim WApp As Object, WDoc As Object, WDR As Object
  Dim ExR As Range
  Dim TableNo As Long
  
  Set ExR = Selection ' current location in Excel Sheet
  
  'let's select the WORD doc
  Set FD = Application.FileDialog(msoFileDialogOpen)
  FD.Show
  If FD.SelectedItems.Count &lt;&gt; 0 Then
      FName = FD.SelectedItems(1)
  Else
      Exit Sub
  End If
  
   ' open Word application and load doc
  Set WApp = CreateObject("Word.Application")
  ' WApp.Visible = True
  Set WDoc = WApp.Documents.Open(FName)
  TableNo = WDoc.tables.Count
  
  ' Find field table on left side
  WApp.Selection.Find.Execute FindText:="Unique Furniture Produced"
  
  ' move cursor to corresponding value table on right side
  WApp.Selection.Move Unit:=TableNo, Count:=1
  
  ' I need this part to select the tables value
  'WApp.Selection.MoveRight Unit:=2, Count:=1, Extend:=1
  
  ' grab and put into excel
  Set WDR = WApp.Selection
  ExR(1, 1) = WDR ' place at Excel cursor
  
  WDoc.Close
  WApp.Quit
  
  End Sub
  </code></pre>
  
  <p>Prints a square symbol into the selected excel cell, while it's supposed to print 2 for the example report I am using. We want to keep a running log of our production and being able to extract the data from the imported word reports into excel with the use of VBA would greatly help.</p>