Splitting Document into pages

Home Forums Open-Xml-PowerTools Splitting Document into pages

This topic contains 2 replies, has 2 voices, and was last updated by  Eric White 7 years, 11 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #3381

    aidal
    Participant

    Hi,

    I need to replace the footers on every page of a document (docx) except the last page with some static footer whereas the last page has a header with some dynamic contents.

    I’m not sure what the best way to accomplish this would be (I’m assuming DocumentBuilder), but one way could be to split the document into pages and replace the footer on all the pages except the last one and then merge them back into one document – maybe this can be done even without splitting the document I don’t know.

    Anyone know how this could be done?

    /Aidal

    #3383

    aidal
    Participant

    Wops, there was a typo in that description.

    Each page has a footer. I need to replace that footer with a static text except from the footer on the last page, that one needs to remain as it is.

    If that can be done without splitting the document, that would be great and I would like to know if anyone can tell me how to.

    If it cannot, could the document then be splitted/shredded so that it could be archived this way?

    /Aidal

    #3397

    Eric White
    Keymaster

    There isn’t an option in WordprocessingML to set the header/footer for the last page.

    There also isn’t any code that I know of to properly paginate a document, and without paginating a document, there is no way to know of the contents of the last page. Is the last page in its own section? Is there are hard break before the last page that you can use to identify the last page?

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.