Add different footer in a Word file with C#. RRS feed

  • Question

  • Hello everyone I want to know if any possible way can add different footer in a word ? For example, I need page one use footer1 and the rest use footer2. Many Thanks!
    Wednesday, May 27, 2015 7:08 AM


All replies

  • Yes, it's certainly possible. The are various ways to go about it, so it would help if you could please give us more detail about the kind of project you're working on...

    In the meantime, please test whether the following steps an end-user would use, in the Word interface, give you the desired result:

    (Assuming Word 2007 or later):

    1. Open the document in Word
    2. Insert/Header & Footer/Footer: "Edit Footer"
    3. Header & Footer Tools/Options/Different First Page: activate the checkbox

    At this point, the Footer already present in the document will appear on the second and following pages. You create a new footer on Page 1.

    Note: This test is just to make sure we're talking about the same thing, it's not a proposed solution. ALTHOUGH, if you're C# application is going to be creating many documents along the same lines it would make a LOT of sense to create a TEMPLATE file and use it as the basis of each document. This setting can be part of the template so your code wouldn't need to handle this action.

    Cindy Meister, VSTO/Word MVP, my blog

    Wednesday, May 27, 2015 4:39 PM
  • Actually U can add more sections, then different pages in different sections, you can set footers for sections,then they can be different.

    But I sure believe add footer is not a difficult thing. Insert header footer in Word document in C#.

    Thursday, May 28, 2015 2:35 AM
  • Hi staggieko,

    First, please refer to JWX123’s reply to add footer.

    Secondly, to change the footer different with first footer, we could change PageSetup.DifferentFirstPageHeaderFooter property.



    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, May 28, 2015 6:55 AM