Skip to end of metadata
Go to start of metadata

Description

Passes a document from WordApplication to WordTemplate.

C#
 public void Open(WordApplication aApp, Document aDoc)
vb.net
Public Sub Open(ByVal aApp As WordApplication, ByVal aDoc As Document)

Parameters

aApp
The instance of WordApplication that was used to create the document.
aDoc
A Document object representing the Word file created with WordApplication.

Remarks

You can use WordApplication to create a document with merge fields (a template) and pass the file to WordTemplate to populate the merge fields.

Examples

C#

          WordApplication wwApp = new WordApplication();
          Document doc = wwApp.Create();
          WordTemplate wwTmpl = New WordTemplate();
          wwTmpl.Open(wwApp, doc);
        
vb.net

          Dim wwApp As New WordApplication()
          Dim doc As Document = wwApp.Create()
          Dim wwTmpl As New WordTemplate()
          wwTmpl.Open(wwApp, doc)
        
  • No labels