Hello everyone,
I have a Word document in which I have a footer with automatic numbering.
Displayed on screen : Pages 1
My aim is to check the page displayed to the user, to verify its value. I run my document like this:
DocumentAspose doc = new DocumentAspose(memoryStream);
for (int i = 0; i < doc.PageCount; i++) {
DocumentAspose pageDoc = doc.ExtractPages(pageIndex, 1);
foreach (Paragraph paragraph in pageDoc.GetChildNodes(NodeType.Paragraph, true)) {
var text = paragraph.GetText();
}
}
I then analyze the contents of my “text” variable. My problem is that this variable doesn’t actually contain “Pages 1” but :
Pages PAGE * MERGEFORMAT9
Is there a way to define in the options that we want to have the calculated value actually displayed on the screen, instead of the MERGEFORMAT
?
Thank you very much !
Best regards,