Using the code below:
If File.Exists(doc.DocumentPath & doc.DocumentName) Then document.AppendDocument(tempDoc, ImportFormatMode.KeepSourceFormatting) document.UpdatePageLayout() End If 'document.Save("c:\temp_
to append documents together. The document filenames are held in a database which also has a use logo flag. This is set to true and false for different docuemnts.
However if the first document has a header with a logo in it, it is used on ever other page.
I have removed the headers:
Dim h As Aspose.Words.SectionCollection h = document.Sections For Each dh In h dh.HeadersFooters(HeaderFooterType.HeaderFirst).Remove() dh.HeadersFooters(HeaderFooterType.HeaderPrimary).Remove() Next
But it then has no header on any of the docs.
SO… how can I control headers and footers as I append documents…