The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

How to: Programmatically Create New Documents


When you create a document programmatically, the new document is a native T:Microsoft.Office.Interop.Word.Document object. This object does not have the additional events and data binding capabilities of a Microsoft.Office.Tools.Word.Document host item. For more information, see Programmatic Limitations of Host Items and Host Controls.

Applies to: The information in this topic applies to document-level projects and VSTO add-in projects for Word. For more information, see Features Available by Office Application and Project Type.

When you develop a document-level project, you cannot programmatically add Microsoft.Office.Tools.Word.Document host items to your project. In a VSTO Add-in project, you can convert any T:Microsoft.Office.Interop.Word.Document object to a Microsoft.Office.Tools.Word.Document host item at run time. For more information, see Extending Word Documents and Excel Workbooks in VSTO Add-ins at Run Time.

To create a new document based on the Normal template

The M:Microsoft.Office.Interop.Word.Documents.Add(System.Object@,System.Object@,System.Object@,System.Object@) method has an optional Template argument to create a new document based on a template other than the Normal template. You must supply the file name and fully qualified path of the template.

To create a new document based on a custom template

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2015 Microsoft