We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to create documents based on a DOT-template

Thread ID:





63057 Jun 27,2007 03:39 PM UTC Jun 28,2007 08:29 AM UTC WinForms 1
Tags: DocIO
Christian Nein
Asked On June 27, 2007 03:39 PM UTC


we have an application generating MS Word based reports with Office 2003 Primary Interop Assemblies. I am currently evaluating XlsIO and DocIO becuase we are looking for a way to directly produce Word files without using MS Word.

My question is: how can I create a new document based upon an existing DOT-template with DocIO? This is a crucial feature for us because we provide the users with a template (DOT-file) which they can adapt to their individual needs.

Thanks in advance & best regards

Melba Winshia [Syncfusion]
Replied On June 28, 2007 08:29 AM UTC

Hi Christian,

You can create a new document based upon an existing DOT-template with DocIO by using the following code snippet:


WordDocument document = new WordDocument();

//Opening DOT-template
document.Open(@"..\..\Data\Essential DocIO.dot");

//Add a new section to the document.
IWSection section = document.AddSection();

//Adding a new paragraph to the section.
IWParagraph paragraph = section.AddParagraph();

//Insert Text into the paragraph
paragraph.AppendText( "Hello World!" );

//Saving the document to disk.

Here is the sample for your reference:


Kindly let me know if you have any other questions.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon