public static WordDocument CreateMailMergeTemplate() { WordDocument document = new WordDocument(); WordDocumentBuilder builder = new WordDocumentBuilder(document); //Insert salutation builder.InsertText("Hello "); builder.InsertField("MERGEFIELD CustomerFirstName", ""); builder.InsertText(" "); builder.InsertField("MERGEFIELD CustomerLastName", ""); builder.InsertText(","); //Insert a blank line builder.InsertParagraph(); //Insert mail body builder.InsertParagraph(); builder.InsertText("Thanks for purchasing our "); builder.InsertField("MERGEFIELD ProductName ", ""); builder.InsertText(", please download your Invoice at "); builder.InsertField("MERGEFIELD InvoiceURL", ""); builder.InsertText(". If you have any questions please call "); builder.InsertField("MERGEFIELD SupportFhone", ""); builder.InsertText(", or email us at "); builder.InsertField("MERGEFIELD SupportEmail", ""); builder.InsertText("."); //Insert a blank line builder.InsertParagraph(); //Insert mail ending builder.InsertParagraph(); builder.InsertText("Best regards,"); builder.InsertBreak(BreakType.LineBreak); builder.InsertField("MERGEFIELD EmployeeFullname", ""); builder.InsertText(" "); builder.InsertField("MERGEFIELD EmployeeDepartment", ""); return(document); }