Document page editor

I want to edit the page number, amend the page number.How to do?
I want to insert a domain"={PAGE}*2-1",but builder.InsertField(" ={PAGE}*2-1");can’t achieve.
so help me!
thank you

According to the effect of the Alt + F9 after inserted into the document
Page {={ PAGE }*2-1} of {={SECTIONPAGES}*2}

Hi Albert,

Thanks for your inquiry. Please use the following code example to insert the nested field in the document. Hope this helps you. Please let us know if you have any more queries.

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
// Insert a few page breaks (just for testing)
for (int i = 0; i < 5; i++)
    builder.InsertBreak(BreakType.PageBreak);
Field field = builder.InsertField(@"= ");
builder.MoveTo(field.Separator);
builder.InsertField("PAGE");
builder.Write(" * 2 - 1");
// Finally update the outer field to recalcaluate the final value. Doing this will automatically update
// the inner fields at the same time.
field.Update();
doc.Save(MyDir + "Out.docx");