public static void Run() { // You need to have a valid license for Aspose.Words. // The best way is to embed the license as a resource into the project // And specify only file name without path in the following call. // Aspose.Words.License license = new Aspose.Words.License(); // License.SetLicense(@"Aspose.Words.lic"); // The path to the documents directory. string dataDir = RunExamples.GetDataDir_LoadingAndSaving(); string srcFileName = dataDir + "SOI 2007-2012-DeeM with footnote added.doc"; string tocTemplate = dataDir + "TocTemplate.doc"; string outDir = Path.Combine(dataDir, "_out"); Directory.CreateDirectory(outDir); // This class does the job. Worker w = new Worker(); w.Execute(srcFileName, tocTemplate, outDir); Console.WriteLine("\nDocument split into HTML pages successfully.\nFile saved at " + outDir); }