Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
Description

Excerpt

Passes a document from WordApplication to WordTemplate.

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

The instance of WordApplication that was used to create the document.

Param
aDoc
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.

Example
Code Block
csharp
csharp
titleC#

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

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