I have a generated word document (docx) and want to change the page number afterwards, in a way that it starts at number X. The page number is included in the footer of the word document. Where in the XML files do I need to apply this change?
I have changed a document to start at number 4 and looked at the XML code. The element <w:pgNumType w:start="4"/>
was added. But if I only add this part manually to the XML, the document is broken.
document.xml content before adding "start with number 4":
<w:sectPr w:rsidR="00C17A11" w:rsidRPr="00CD0C83" w:rsidSect="00A86D42">
<w:headerReference r:id="rId8" w:type="even"/>
<w:headerReference r:id="rId9" w:type="default"/>
<w:footerReference r:id="rId10" w:type="even"/>
<w:footerReference r:id="rId11" w:type="default"/>
<w:headerReference r:id="rId12" w:type="first"/>
<w:footerReference r:id="rId13" w:type="first"/>
<w:pgSz w:h="16838" w:w="11906"/>
<w:pgMar w:bottom="851" w:footer="567" w:gutter="0" w:header="851" w:left="1304" w:right="567" w:top="828"/>
<w:cols w:space="708"/>
<w:docGrid w:linePitch="360"/>
</w:sectPr>
And after adding "start with number 4":
<w:sectPr w:rsidR="00C17A11" w:rsidRPr="00CD0C83" w:rsidSect="00CA253E">
<w:headerReference w:type="default" r:id="rId8"/>
<w:footerReference w:type="default" r:id="rId9"/>
<w:pgSz w:w="11906" w:h="16838"/>
<w:pgMar w:top="828" w:right="567" w:bottom="851" w:left="1304" w:header="851" w:footer="567" w:gutter="0"/>
<w:pgNumType w:start="4"/>
<w:cols w:space="708"/>
<w:docGrid w:linePitch="360"/>
</w:sectPr>
_rels
,docProps
word
and[Content_Types].xml
? I unpacked the .wordx file, changed the element you mentioned from4
to5
zipped it back and it works for me. – Jagger