title: Fill existing table in Microsoft Word dynamically via C#
body: <p>I have created a Word template with a table that I would like to fill dynamically.
  The number of rows is always dynamic and always different.</p>
  
  <p>How can I fill and extend an existing table? I have already started to implement code.
  I can create new tables and fill them, but not existing ones.</p>
  
  <pre><code>object oMissing = Missing.Value;
  
  Word._Application word = new Word.Application();
  word.Visible = true;
  
  // Template
  object oTemplate = "C:\\Temp\\Template.dotx";
  Word._Document document = word.Documents.Add(ref oTemplate, ref oMissing, ref oMissing, ref oMissing);
  
  // Insert table and fill with data
  Word.Table oTable;
  
  int columnCount = 4;
  int rowCount = someVariableCount;
  
  // Table Bookmark
  object oBookMark = "Table";
  
  Word.Range wrdRng = document.Bookmarks.get_Item(oBookMark).Range;
  oTable = document.Tables.Add(wrdRng, someVariableCount, columnCount, ref oMissing, true);
  </code></pre>