Session.AppendDocumentFile Method

This method appends one document to the end of another document. For example, if you assemble two separate documents, you could then use this method to combine them into one document.

Syntax

public void AppendDocumentFile ( string sourceFilePath, string destinationFilePath, HotDocs.Server.Interop.appendOptions options )

Parameters Description
sourceFilePath The document to be appended to the end of the destinationFilePath document.
destinationFilePath The document to which sourceFilePath will be appended.
options One of the following values from the appendOptions enumeration:
  • appendNone: Do not keep the header or footer of the appended document.
  • appendHeader: Keep the header of the appended document.
  • appendFooter: Keep the footer of the appended document.
  • appendBoth: Keep both the header and the footer of the appended document.

Example

The following Visual C# code appends one document (invoice1) to the end of another (invoice2) using the appendFooter option.

public class ExampleCode
{
    static void Main()
    {
        HotDocs.Server.Session HDSSession = new HotDocs.Server.Session();
        HDSSession.AppendDocumentFile("c:\\temp\\invoice1.docx", "c:\\temp\\invoice2.docx",
HotDocs.Server.Interop.appendOptions.appendFooter);
    }
}