

Check the box labeled Different First Page to set up a different header or. Put your cursor in the first page, then choose Insert Header First Page from the pulldown menus.

But instead, the textbox is created in the primary page header.

doc) that has a different first page header (this behaviour also happens with different odd/even page headers). StrBldrFooter.AppendLine(txtFooter.Trim()) To create a different header or footer : og setup Margins Paper Layout 1. Then select the style to use for the next page (pick one from the menu - such as Default ). I am trying to create a textbox in the first page header, in a Word 2003 document (file extension. If (txtFooter = null || txtFooter.ToString().Trim().Length <= 0) StrBldrHeader.AppendLine(txtHeader.Trim()) įoreach (Word.HeaderFooter footer in section.Footers) To correct this: Select the header on page 2. This will have the opposite effect of what you want: the header and footer will disappear from page 1. If (txtHeader = null || txtHeader.ToString().Trim().Length <= 0) Tick the check box 'Different First Page' in the Options group of the Design tab of the ribbon (this tab is only visible when you're in the header or footer). StringBuilder strBldrFooter = new StringBuilder() įoreach (Word.Section section in document.Sections)įoreach (Word.HeaderFooter header in section.Headers) In my project I have used the Inter-op object for getting the header but in a some document I get other 2nd page header and after that i got first page header because document having header footer properties like even-odd header-footer, firstpagedifferent etc.īut I got this below output because of header and footer firstpagedifferent property:įirst page header - Header page 2 StringBuilder strBldrHeader = new StringBuilder() I want a First page header of word document.
