Xceed Words for .NET v3.0 Documentation
Appending to a Document
Welcome to Xceed Words for .NET v3.0 > Code Snippets > Appending to a Document

The following example demonstrates how to append a Document to another one.

C#
Copy Code
    // Load the first document.

    using( var document1 = DocX.Load( "First.docx" ) )

    {

      // Load the second document.

      using( var document2 = DocX.Load( "Second.docx" ) )

      {

        // Insert a document at the end of another document.

        // When true, document is added at the end. When false, document is added at beginning.

        document1.InsertDocument( document2, true );

        // Save this document to disk.

        document1.SaveAs( "AppendDocument.docx" );

      }

    }