Session.GetDocumentFileExtension Method

This method returns the file name extension of documents assembled from a specific template. For example, if you are assembling a HotDocs form (.HFT) template, the file name extension for an assembled document is .HFD. Likewise, the file name extension for an assembled Word RTF template is .RTF.

Syntax

public string GetDocumentFileExtension ( string templateFileName )

Parameters Description
templateFileName The file name and path of a HotDocs template. (Only templates that produce documents are valid; interview (.CMP) templates do not produce assembled documents, and are thus invalid.)

Example

The following Visual C# code displays the document file extension for a template.

public class ExampleCode
{
    static void Main()
    {
        HotDocs.Server.Session HDSSession = new HotDocs.Server.Session();
        string fileName = "c:\\temp\\lifeappl.hft";
        System.Console.WriteLine("The document file extension for {0} is {1}.",
            fileName,HDSSession.GetDocumentFileExtension(fileName));
    }
}