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
Note
iconfalse

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

Table of Contents

Table of Contents
Description

Excerpt

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.

Signature
C#
C#
 public sealed class WordApplication
Signature
vb.net
vb.net
Public NotInheritable Class WordApplication
Remarks

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:

Code Block
csharp
csharp
titleC#
using SoftArtisans.OfficeWriter.WordWriter;
Code Block
vbnet
vbnet
titlevb.net
Imports SoftArtisans.OfficeWriter.WordWriter
Example
Code Block
csharp
csharp
titleC#

          //--- Create an instance of the WordApplication class
          WordApplication oWordApplication = new WordApplication();
        
Code Block
vbnet
vbnet
titlevb.net

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

Name

Description

AlwaysUseUnicode

Excerpt Include
WordApplication.AlwaysUseUnicode
WordApplication.AlwaysUseUnicode
nopaneltrue

LicenseKey

Excerpt Include
WordApplication.LicenseKey
WordApplication.LicenseKey
nopaneltrue

Preserve

Excerpt Include
WordApplication.Preserve
WordApplication.Preserve
nopaneltrue

Version

Excerpt Include
WordApplication.Version
WordApplication.Version
nopaneltrue
Methods

Name

Description

Create()

Excerpt Include
WordApplication.Create()
WordApplication.Create()
nopaneltrue

Open(String)

Excerpt Include
WordApplication.Open(String)
WordApplication.Open(String)
nopaneltrue

Open(System.IO.Stream)

Excerpt Include
WordApplication.Open(System.IO.Stream)
WordApplication.Open(System.IO.Stream)
nopaneltrue

Open(WordTemplate)

Excerpt Include
WordApplication.Open(WordTemplate)
WordApplication.Open(WordTemplate)
nopaneltrue

Save(Document, String)

Excerpt Include
WordApplication.Save(Document, String)
WordApplication.Save(Document, String)
nopaneltrue

Save(Document, System.IO.Stream)

Excerpt Include
WordApplication.Save(Document, System.IO.Stream)
WordApplication.Save(Document, System.IO.Stream)
nopaneltrue

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

Excerpt Include
WordApplication.Save(Document, System.Web.HttpResponse, String, Boolean)
WordApplication.Save(Document, System.Web.HttpResponse, String, Boolean)
nopaneltrue

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

Excerpt Include
WordApplication.Save(Document, System.Web.HttpResponse, String, Boolean, String)
WordApplication.Save(Document, System.Web.HttpResponse, String, Boolean, String)
nopaneltrue

WordApplication()

Excerpt Include
WordApplication.WordApplication()
WordApplication.WordApplication()
nopaneltrue
Extensionmethods

Overload

Description

Open(Microsoft.SharePoint.SPDocumentLibrary, String)

Excerpt Include
SharePointIntegration.Open(WordApplication, Microsoft.SharePoint.SPDocumentLibrary, String)
SharePointIntegration.Open(WordApplication, Microsoft.SharePoint.SPDocumentLibrary, String)
nopaneltrue

Open(Microsoft.SharePoint.SPListItem, String)

Excerpt Include
SharePointIntegration.Open(WordApplication, Microsoft.SharePoint.SPListItem, String)
SharePointIntegration.Open(WordApplication, Microsoft.SharePoint.SPListItem, String)
nopaneltrue

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

Excerpt Include
SharePointIntegration.Save(WordApplication, Document, Microsoft.SharePoint.SPDocumentLibrary, String, Boolean)
SharePointIntegration.Save(WordApplication, Document, Microsoft.SharePoint.SPDocumentLibrary, String, Boolean)
nopaneltrue

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

Excerpt Include
SharePointIntegration.Save(WordApplication, Document, Microsoft.SharePoint.SPListItem, String)
SharePointIntegration.Save(WordApplication, Document, Microsoft.SharePoint.SPListItem, String)
nopaneltrue