title: Adding page number in word header table C#
body: <p>I have created a 1x3 table as my header in word. This is how I want it to look like.</p>
  
  <p>LeftText          MiddleText                   PageNumber:</p>
  
  <p>I want the PageNumber cell to look like this -</p>
  
  <p>Page: X of Y</p>
  
  <p>I have managed to do cell (1,1) and (1,2). I found this to help me with cell (1,3) but it is not working as I like. I know how to get the total count of the document. I'm not sure how to implement it properly.</p>
  
  <pre><code>Range rRange = restheaderTable.Cell(1, 3).Range;
  rRange.End = rRange.End - 1;
  oDoc.Fields.Add(rRange, Type: WdFieldType.wdFieldPage, Text: "Page Number: ");
  </code></pre>
  
  <p>I can't even get the Text "Page Number: " to display in the cell. All it has is a number right now.</p>