Xceed Words for .NET v5.0 Documentation
Welcome to Xceed Words for .NET v5.0 / Code Snippets / Appending to a Document
In This Topic
    Appending to a Document
    In This Topic

    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" );
          }
        }