Description
Takes a WordTemplate object representing a template Word file, and opens the file as a Document object.
C#
public Document Open(WordTemplate wwt)
vb.net
Public Function Open(ByVal wwt As WordTemplate) As Document
Parameters
wwt
AWordTemplate object representing a template Word file.
Returns
The Word file that was passed fromWordTemplate to WordApplication.
Exceptions
System.Exception
Thrown if an error occurs while opening the template.Remarks
Though theWordTemplate object currently supports Office Open XML (Word 2007) format files, WordApplication.Open() does not yet support them.
Examples
C#
WordTemplate wTempl = new WordTemplate();
...
wTempl.Process();
WordApplication wApp = new WordApplication();
Document doc = wApp.Open(wTempl);
...
vb.net
Dim wTempl As New WordTemplate()
...
wTempl.Process()
Dim wApp As New WordApplication()
Dim doc As Document = wApp.Open(wTempl)
