title: Get Value and Position of Checkbox in Word Table to Copy Entire Table to Excel
body: <p>I have a Word file with approximately 10 pages and 20 tables. Some of these tables have checkboxes. I want to copy these tables into an Excel file.</p>
  <p>The following code copies all tables from my Word file into my Excel file:</p>
  <pre class="lang-vb prettyprint-override"><code>Sub Import()
      Option Explicit
      
      Dim wb As Workbook
      Dim sh As Worksheet
      Dim sheet As Worksheet
      Dim lzeile As Integer
      Set wb = ActiveWorkbook
      Set sh = wb.ActiveSheet
      Set sheet = wb.Worksheets(&quot;Tabelle1&quot;)
          
      Dim Btxt As Object
      Set Btxt = CreateObject(&quot;Word.Application&quot;)
      
      Btxt.Visible = True
      Btxt.documents.Open &quot;C:\Users\*.doc&quot;          '*=path
      lzeile = 0
      
      For i = 1 To 20
          Btxt.ActiveDocument.Tables(i).Range.Copy
              
          Application.Goto sheet.Cells(1 + lzeile, 1)
          sheet.PasteSpecial Format:=&quot;HTML&quot;, Link:=False, DisplayAsIcon:=False
          
          lzeile = sheet.Cells(Rows.Count, 1).End(xlUp).Row
          lzeile = lzeile + 1
          sheet.Cells(lzeile, 1) = &quot;Tabelle&quot; &amp; i
      Next i
      
      Btxt.Quit
      Set Btxt = Nothing
      Set wb = Nothing
      Set sh = Nothing
      
  End Sub
  </code></pre>
  <p>It does not copy checkboxes or the value (0 = not checked / 1 = checked) of the checkbox.<br />
  I can write the value of a checkbox into a cell in my excel sheet with this line:</p>
  <pre><code>sheet.Cells(j, 10) = Btxt.ActiveDocument.Tables(i).FormFields.Item(&quot;Kontrollkästchen&quot; &amp; j).Result
  </code></pre>
  <p>With a loop j over all &quot;Kontrollkästchen&quot; (german translation of contentcontrol or formfield item) so basically the name of all formfield items in this Word file.<br />
  How can I get the position of these formfield items or identify which formfield item / ContentControl is in which table?</p>
  <p>I tried to go through all rows and columns in each table because none of them are larger than 10x10. But I can´t find a way to check if a checkbox is maybe in table 3 on column 5 row 5 and then read the name of this checkbox to a safe the value (0 / 1) in the Excel cell on the same position in my copied table.</p>