title: c# how to get tables in the footer of a word document
body: <p>I got some problems with the Microsoft office library in C#. When I try to get the table present in my first page's footer, the programme cannot find it, I can only get the table in text format : </p>
  
  <pre><code>object nom_fi = (object)chemin;
  object readOnly = false;
  object isVisible = false;
  object missing = System.Reflection.Missing.Value;
  Microsoft.Office.Interop.Word.Application wordApp = new Microsoft.Office.Interop.Word.Application();
  Microsoft.Office.Interop.Word.Document doc = wordApp.Documents.Open(ref nom_fi, ref missing, ref readOnly, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref isVisible, ref missing, ref missing, ref missing, ref missing);
  doc.Activate();
  
  foreach (Microsoft.Office.Interop.Word.Section sec in doc.Sections)
  {
      Microsoft.Office.Interop.Word.Range range = sec.Footers[Microsoft.Office.Interop.Word.WdHeaderFooterIndex.wdHeaderFooterPrimary].Range;
      Microsoft.Office.Interop.Word.Table t = range.Tables[0];
  }
  doc.Close();
  </code></pre>
  
  <p>Thanks for your attention</p>
  
  <p>EDIT : exception : </p>
  
  <p><a href="https://i.stack.imgur.com/1L9oG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1L9oG.png" alt="enter image description here"></a></p>
  
  <p>It says : "Member of required collection does not exists"</p>