title: How to insert custom page number in Aspose.Words
body: <p>I want to add custom page numbers (like 1/2,2/2) to word document with using Aspose.Words. But I couldn't find any sample for c# language. I tried to overrite footer but i couldn't give a format to page numbers.
  Pls help!
  Thanks!</p>
  
  <hr>
  
  <p>edit</p>
  
  <hr>
  
  <p>After i tried first answer,it worked as what i want but  another problem came up. I adding child documents to main document. I can only formatting main document's number. Child documents still have ordinary page number.
  Here a sample of code;</p>
  
  <pre><code>   public void AddChildDocs (System.IO.Stream parentStream, List&lt;System.IO.Stream&gt; childStreams)
      {
  
          doc = new Aspose.Words.Document(parentStream);
  
          if (Items.Count &gt; 0)
          {
              WordReplacer evaluator = new WordReplacer(this);
              doc.Range.Replace(new Regex(ReplaceRegex), evaluator, false);
          }
          foreach (var item in childStreams)
          {
              Aspose.Words.Document childDoc = new Aspose.Words.Document(item);
              if (Items.Count &gt; 0)
              {
                  WordReplacer evaluator = new WordReplacer(this);
                  childDoc.Range.Replace(new Regex(ReplaceRegex), evaluator, false);
              }
              doc.AppendDocument(childDoc, ImportFormatMode.KeepSourceFormatting);
          }
  
          DocumentBuilder builder = new DocumentBuilder(doc);
          builder.MoveToHeaderFooter(HeaderFooterType.FooterPrimary);
          builder.InsertField("PAGE", "");
          builder.Write(" / ");
          builder.InsertField("NUMPAGES", "");
      }
  </code></pre>