title: Restart page numbering in header with OpenXML SDK 2.0
body: <p>I can't figure out how to start the page numbering at a specific point for a section using OpenXML SDK 2.0.  Here's what I see when I reflect on a header in a document using the OpenXML Productivity Tool:</p>
  
  <pre><code>&lt;w:hdr xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" mc:Ignorable="w14 wp14"&gt;
    &lt;w:p w:rsidR="00FC0BC9" w:rsidP="00FC0BC9" w:rsidRDefault="005F46AD"&gt;
      &lt;w:pPr&gt;
        &lt;w:pStyle w:val="Header" /&gt;
        &lt;w:ind w:right="360" /&gt;
        &lt;w:jc w:val="right" /&gt;
      &lt;/w:pPr&gt;
      &lt;w:r&gt;
        &lt;w:t xml:space="preserve"&gt;I-1 Page &lt;/w:t&gt;
      &lt;/w:r&gt;
      &lt;w:r&gt;
        &lt;w:fldChar w:fldCharType="begin" /&gt;
      &lt;/w:r&gt;
      &lt;w:r&gt;
        &lt;w:instrText xml:space="preserve"&gt; PAGE  \* Arabic  \* MERGEFORMAT &lt;/w:instrText&gt;
      &lt;/w:r&gt;
      &lt;w:r&gt;
        &lt;w:fldChar w:fldCharType="separate" /&gt;
      &lt;/w:r&gt;
      &lt;w:r w:rsidR="00C62387"&gt;
        &lt;w:rPr&gt;
          &lt;w:noProof /&gt;
        &lt;/w:rPr&gt;
        &lt;w:t&gt;1&lt;/w:t&gt;
      &lt;/w:r&gt;
      &lt;w:r&gt;
        &lt;w:fldChar w:fldCharType="end" /&gt;
      &lt;/w:r&gt;
    &lt;/w:p&gt;
  </code></pre>
  
  <p>It looks like it's building the field using a set of Runs, and then by including a Run with a Text value of "1" to start the page numbering for this header to 1 -- I should mention the section that uses this header is on page 4.</p>
  
  <p>However, when even when I generate the equivalent using the following code for my own document, Word insists on starting the page numbering at the current page.  For example, page 4 starts numbering at page 4, when the desired behavior is that page 4 starts numbering at page 1.</p>
  
  <pre><code>var headerPart = mainDocument.AddNewPart&lt;HeaderPart&gt;(GetHeaderIDFor(actWithScenes.Act, scene));
  
  var header = new Header();
  headerPart.Header = header;
  
  header.Append(new Paragraph(
    new ParagraphProperties(new Justification { Val = JustificationValues.Right }),
    new Run(new Text(staticText) { Space = SpaceProcessingModeValues.Preserve }),
    new Run(new FieldChar { FieldCharType = FieldCharValues.Begin }),
    new Run(new FieldCode { Space = SpaceProcessingModeValues.Preserve, Text = " PAGE  \\* Arabic  \\* MERGEFORMAT " }),
    new Run(new FieldChar { FieldCharType = FieldCharValues.Separate }),
    new Run(new RunProperties(new NoProof()), new Text("1")),
    new Run(new FieldChar { FieldCharType = FieldCharValues.End })
  ));
  </code></pre>
  
  <p>And here's the code where I'm adding a section break, which <em>still</em> doesn't restart the page numbering:</p>
  
  <pre><code>public static Paragraph AppendSectionBreak(Body body, string headerID = null, string footerID = null) {
     var sectionProperties = new SectionProperties();
  
     if (null != headerID) {
        sectionProperties.Append(new HeaderReference { Id = headerID });
     }
  
     if (null != footerID) {
        sectionProperties.Append(new FooterReference { Id = footerID });
     }
  
     var paragraph = new Paragraph(new ParagraphProperties(sectionProperties));
  
     body.Append(paragraph);
  
     return paragraph;
  }
  </code></pre>
  
  <p>So, how do I start the page numbering for a section header at an arbitrary value? Am I missing something?</p>