Field Codes in SimpleField Formulas
mattidupre opened this issue · comments
Matti Dupre commented
I'm attempting to offset the Total Pages in my Header / Footer.
Tried the following (all within Header > Paragraph > TextRun):
new SimpleField('NUMPAGES + 1') // just renders NUMPAGES
new SimpleField('= NUMPAGES + 1') // !Undefined Bookmark, NUMPAGES
new SimpleField('= { NUMPAGES } + 1') // !Syntax Error, {
new SimpleField('{ = { NUMPAGES } + 1 }') // nothing rendered
Is this beyond the scope of the SimpleField class?
Dolan commented
Yes it is beyond the scope. Finding Total pages is a Microsoft Word or Word processor feature
The .docx document (ooxml) itself is dumb, and does not know about pages, it is simply an XML file