Help with Header

I have recently purchased Aspose.Words and am using it to merge documents into a larger document before using Aspose.pdf to build a final pdf document.

I have encountered 2 problems with headers in the resulting word document.

First, there is a problem with underlines that I have solved by changing the header text to a 1x1table with a bottom border which worked well.

The other problem is that the header on page 2 of doc 1 is repeated on all subsequent pages in the merged document.

I am attaching the 2 original documents and the merged doc, in a zip file, to illustrate the problem. I would appreciate any help you can give.

Thanks,

Scott

When documents are combined, if you don’t want the second document to get the headers/footers from the first document then just call Section.HeadersFooters.LinkToPrevious(false) for the first imported section of imported document.

// Open the destination document.
Document dstDoc = new Document("PartEdFeeSchedule.doc");
// Open the source document.
Document srcDoc = new Document("Custodia.doc");
srcDoc.FirstSection.HeadersFooters.LinkToPrevious(false);
AppendDoc(dstDoc, srcDoc);

Combine the documents with the function described in wiki

Best regards,

Vladimir,

Thank you for your quick response. That took care of it.

Much appreciated,

Scott