Is it possible to not automatically insert a section break when appending one document to another ?
Apologies, I think I was way too terse with my question.
When I am constructing a document using the append method, Aspose automatically creates section breaks between the documents, I know that I can use SectionStart.Continuous to make it appear as if there are "no" sections, however thes issue I am having is that the headers and footers whch are defined in a template document do not appear correctly in the destination document. As far as I can tell it is directly related to the automatic creation of section breaks between appended documents.
Is there a way to append documents so that they all become part of a single section (section breaks in the individual documents notwithstanding) ?
The code I am using to construct the destination document is as follows:
Public Shared Function Build(DocsToUse() As String, Template As String) As Document Dim Doc As New Document(Template) Doc.AttachedTemplate = Template
For Each t as String in DocsToUse
AppendDoc(Doc, d) Next<span style="color: blue;">Return</span> Doc <span style="color: blue;">End</span> <span style="color: blue;">Function</span>
Public Shared Sub AppendDoc(Doc As Document, Src As String)
Dim tDoc As New Document(Src)
tDoc.FirstSection.PageSetup.SectionStart = SectionStart.Continuous
For Each sect As Section In tDoc.Sections
sect.HeadersFooters.LinkToPrevious(True)
Next
Doc.AppendDocument(tDoc, ImportFormatMode.UseDestinationStyles)
End Sub
Hopefully I have a bit clearer about the issue I am having.
Many thanks
Hi,