Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0
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.

|title
=C#
}
using SoftArtisans.OfficeWriter.WordWriter;
{code}


{code:vbnet|title=vb.net
}
Imports SoftArtisans.OfficeWriter.WordWriter
{code}


{remarks}
{example}{code:csharp|title=C#}

          //--- Create an instance of the WordApplication class
          WordApplication oWordApplication = new WordApplication();
        
{code}
{code:vbnet|title=vb.net
}

          '--- Create an instance of the WordApplication class
          Dim oWordApplication As New WordApplication()
        
Signature
C#C#
Wiki Markup
{note:icon=false} *WordApplication* is only available in *WordWriter Enterprise Edition*.  (_[WordWriter Editions]_) {note}

|| Table of Contents ||
| {toc} |

{description}
{excerpt}[WordApplication|WordApplication] is the main class for pure code\-based Word document generation \(for information about template\-based workbook generation, see [WordTemplate|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.{excerpt}
{signature:C#}
 public sealed class WordApplication
Signature
{signature}{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
{signature}
{remarks}A generated document is represented by the [Document|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
:csharp
csharp
Code Block
vbnetvbnettitle
Example
Code Block
csharpcsharp
titleC#
Code Block
vbnetvbnettitle
Properties

...

Name

...

Description

...

AlwaysUseUnicode

...

{code}

{example}
{properties}
||Name||Description||
|[AlwaysUseUnicode|WordApplication.AlwaysUseUnicode]|{excerpt-include:WordApplication.AlwaysUseUnicode

...

LicenseKey

|nopanel=true}|
|[LicenseKey|WordApplication.LicenseKey]|{excerpt-include

...

:WordApplication.LicenseKey

...

Preserve

|nopanel=true}|
|[Preserve|WordApplication.Preserve]|{excerpt-include

...

:WordApplication.Preserve

...

Version

|nopanel=true}|
|[Version|WordApplication.Version]|{excerpt-include

...

:WordApplication.Version

...

Methods

...

Name

...

Description

...

Create()

...

|nopanel=true}|
{methods}
||Name||Description||
|[Create()|WordApplication.Create()

...

]|{excerpt-include:WordApplication.Create()

...

|nopanel

...

=true}|
|[Open(String)

...

|WordApplication.Open(String)

...

]|{excerpt-include:WordApplication.Open(String)

...

|nopanel

...

=true}|
|[Open(System.IO.Stream)

...

|WordApplication.Open(System.IO.Stream)

...

]|{excerpt-include:WordApplication.Open(System.IO.Stream)

...

|nopanel

...

=true}|
|[Open(WordTemplate)

...

|WordApplication.Open(WordTemplate)

...

]|{excerpt-include:WordApplication.Open(WordTemplate)

...

|nopanel

...

=true}|
|[Save(Document, String)

...

|WordApplication.Save(Document, String)

...

]|{excerpt-include:WordApplication.Save(Document, String)

...

|nopanel

...

=true}|
|[Save(Document, System.IO.Stream)

...

|WordApplication.Save(Document, System.IO.Stream)

...

]|{excerpt-include:WordApplication.Save(Document, System.IO.Stream)

...

|nopanel

...

=true}|
|[Save(Document, System.Web.HttpResponse, String, Boolean)

...

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

...

]|{excerpt-include:WordApplication.Save(Document, System.Web.HttpResponse, String, Boolean)

...

|nopanel

...

=true}|
|[Save(Document, System.Web.HttpResponse, String, Boolean, String)

...

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

...

]|{excerpt-include:WordApplication.Save(Document, System.Web.HttpResponse, String, Boolean, String)

...

|nopanel

...

=true}|
|[WordApplication()

...

|WordApplication.WordApplication()

...

]|{excerpt-include:WordApplication.WordApplication()

...

|nopanel

...

Extensionmethods

...

Overload

...

Description

=true}|
{extensionMethods}
||Overload||Description||
|[Open(Microsoft.SharePoint.SPDocumentLibrary, String)

...

|SharePointIntegration.Open(WordApplication, Microsoft.SharePoint.SPDocumentLibrary, String)

...

]|{excerpt-include:SharePointIntegration.Open(WordApplication, Microsoft.SharePoint.SPDocumentLibrary, String)

...

|nopanel

...

=true}|
|[Open(Microsoft.SharePoint.SPListItem, String)

...

|SharePointIntegration.Open(WordApplication, Microsoft.SharePoint.SPListItem, String)

...

]|{excerpt-include:SharePointIntegration.Open(WordApplication, Microsoft.SharePoint.SPListItem, String)

...

|nopanel

...

=true}|
|[Save(Document, Microsoft.SharePoint.SPDocumentLibrary, String, Boolean)

...

|SharePointIntegration.Save(WordApplication, Document, Microsoft.SharePoint.SPDocumentLibrary, String, Boolean)

...

]|{excerpt-include:SharePointIntegration.Save(WordApplication, Document, Microsoft.SharePoint.SPDocumentLibrary, String, Boolean)

...

|nopanel

...

=true}|
|[Save(Document, Microsoft.SharePoint.SPListItem, String)

...

|SharePointIntegration.Save(WordApplication, Document, Microsoft.SharePoint.SPListItem, String)

...

]|{excerpt-include:SharePointIntegration.Save(WordApplication, Document, Microsoft.SharePoint.SPListItem, String)

...

|nopanel

...

=true}|