Wiki Markup |
---|
{introducedin:4.1.0.1494} {description} {excerpt} Appends an existing Document to the end of the current Document, separated by a next-page section break {excerpt} {signature:C#} public void Append(SoftArtisans.OfficeWriter.WordWriter.Document other) {signature} {signature:vb.net} Public Sub Append(ByVal other As SoftArtisans.OfficeWriter.WordWriter.Document) {signature} {parameters} {param:other} Document object being appended to the current document. {param} {remarks} This method works by adding all of the Sections of the appended document to the current document; if a the current document has 3 sections and the appended document has 4 sections, the resulting document will have 7 sections. Because sections are preserved, headers, footers, and all other section formatting from both documents are also preserved. {remarks} {example} {code:csharp|title=C#} //--- Open first document Document doc1 = wa.Open(Page.MapPath("documents/first document.doc")); //--- Open second document Document doc2 = wa.Open(Page.MapPath("documents/second document.doc")); //--- Append second document to the first doc1.Append(doc2); //--- Save the resulting document and stream to customer wa.Save(doc1, Page.Response, "output.doc", false); {code} {code:vb.net|title=vb.net} '--- Open first document Dim doc1 As Document = wa.Open(Page.MapPath("documents/first document.doc")) '--- Open second document Dim doc2 As Document = wa.Open(Page.MapPath("documents/second document.doc")) '--- Append second document to the first doc1.Append(doc2) '--- Save the resulting document and stream to customer wa.Save(doc1, Page.Response, "output.doc", false) {code} {example} |
Page History
Overview
Content Tools