title: Select the First Page Header of the second section using Interop.Word in C#
body: <p>I want to select the First Page Header of the second section in my Word document, using Microsoft.Office.Interop.Word (Microsoft Word 12.0 Object Library) in C#.</p>
  
  <p>This is the code that is running:</p>
  
  <pre><code>Range headerRange = oDoc.Sections[2].Headers[WdHeaderFooterIndex.wdHeaderFooterFirstPage].Range;
  headerRange.Select();
  </code></pre>
  
  <p>It is selecting the First Page Header of the first section. I want to select the First Page Header of the second section to unlink it from the header of the first section and make it look different.</p>
  
  <p>For some more input I loop over some information that I add to the document and add a new section between each loop with this code:</p>
  
  <pre><code>object oEndOfDoc = @"\endofdoc";
  oDoc.Bookmarks.get_Item(ref oEndOfDoc).Range.InsertBreak(WdBreakType.wdSectionBreakNextPage);
  </code></pre>