title: Inserting a row into a Word Table with Excel VBA
body: <p>I have written a program to migrate a set of data from Excel into Word.  The problem is that the format of form in word the must be entered into a new file in a very specific format, with new lines being inserted into the line data. In other words, I have information that is currently held in column two for every row in excel, that now has to be moved into a single row in the sheet I am solving this through adding a row after the table is created in word and then merging them, but the code I found keeps producing the runtime error 4120 Bad parameter.  I am guessing that the code that I am using is actually for use within word not from excel. Any help on the proper code would be appreciated. </p>
  
  <pre><code>If section1 = True Then
      'wdDoc.Tables(1).Rows.Add BeforeRow:=.Rows(2)
      wdDoc.Tables.Rows.Add (2)
      With wdDoc.Tables(1)
          .Cell(Row:=2, Column:=2).Merge _
          MergeTo:=.Cell(Row:=2, Column:=10)
          .Borders.Enable = False
          wdDoc.Tables(1).Cell(2, 2).Range.Text = "Section I - Authorized Ship Changes"
      End With
  Else
  End If
  </code></pre>