title: VBA Word - Text form fields in table
body: <p>I need to add form field with to every cell in a table. Here is what I have so far.</p>
  <pre><code>Set csvTable = ActiveDocument.Tables(2)
  With csvTable  
          For r = 1 To UBound(csvData)
              .cell(r + 4, 1).Range.FormFields.Add(Range:=.cell(r + 4, 1).Range, Type:=wdFieldFormTextInput).Result = csvData(r)(0)
              .cell(r + 4, 3).Range.FormFields.Add(Range:=.cell(r + 4, 3).Range, Type:=wdFieldFormTextInput).Result = csvData(r)(3)
              .cell(r + 4, 5).Range.FormFields.Add(Range:=.cell(r + 4, 5).Range, Type:=wdFieldFormTextInput).Result = csvData(r)(4)
              .cell(r + 4, 4).Range.FormFields.Add(Range:=.cell(r + 4, 5).Range, Type:=wdFieldFormTextInput).Result = csvData(r)(5)
              .cell(r + 4, 5).Range.FormFields.Add(Range:=.cell(r + 4, 5).Range, Type:=wdFieldFormTextInput).Result = csvData(r)(6)
              Next
          
  End With
  </code></pre>
  <p>The code seems to add form fields as wanted to all the cells, but the text added ends up only in the first column (i.e. for each row, the text is iteratively updated in the first column only and I end up with csvData(r)(6) in the first column of each row). Any help would be appreciated!</p>