WordApplication is only available in WordWriter Enterprise Edition. (WordWriter Editions)

Table of Contents

WordApplication is the main class for pure code-based Word document generation (for information about template-based workbook generation, see WordTemplate ). This class is an engine used to open, create, and write (save to disk or stream to a browser) Word documents. A single instance of WordApplication can generate multiple documents.

 public sealed class WordApplication
Public NotInheritable Class WordApplication

A generated document is represented by the Document class.

The WordApplication class is in the SoftArtisans.OfficeWriter.WordWriter namespace. The class can can be referenced as SoftArtisans.OfficeWriter.WordWriter. To minimize typing and errors, import the namespace to the aspx page, and reference the class as WordApplication, without the namespace prefix. If you are coding directly in the .aspx page, following the Page directive, include:

If you are coding in the code-behind page (.aspx.cs or .aspx.vb), include a using or Imports statement at the top of the code behind page:

using SoftArtisans.OfficeWriter.WordWriter;
Imports SoftArtisans.OfficeWriter.WordWriter

          //--- Create an instance of the WordApplication class
          WordApplication oWordApplication = new WordApplication();
        

          '--- Create an instance of the WordApplication class
          Dim oWordApplication As New WordApplication()
        

Name

Description

AlwaysUseUnicode

LicenseKey

Preserve

Version

Name

Description

Create()

Open(String)

Open(System.IO.Stream)

Open(WordTemplate)

Save(Document, String)

Save(Document, System.IO.Stream)

Save(Document, System.Web.HttpResponse, String, Boolean)

Save(Document, System.Web.HttpResponse, String, Boolean, String)

WordApplication()

Overload

Description

Open(Microsoft.SharePoint.SPDocumentLibrary, String)

Open(Microsoft.SharePoint.SPListItem, String)

Save(Document, Microsoft.SharePoint.SPDocumentLibrary, String, Boolean)

Save(Document, Microsoft.SharePoint.SPListItem, String)