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: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#}
Wiki Markup
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}{signature:
}
Signature
vb.net
vb.net
Public NotInheritable Class WordApplication
{signature}
{remarks}A generated document is represented by the [Document|Document] class.

The {{WordApplication}} class is in the {{
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
title
=
C#
}

using SoftArtisans.OfficeWriter.WordWriter;
{code} {code:vbnet|title=
Code Block
vbnet
vbnet
titlevb.net
}

Imports SoftArtisans.OfficeWriter.WordWriter
{code} {remarks} {example}{code:csharp|title=C#}
Example
Code Block
csharp
csharp
titleC#


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


          '--- Create an instance of the WordApplication class
          Dim oWordApplication As New WordApplication()
        
{code} {example} {properties} ||Name||Description|| |[AlwaysUseUnicode|WordApplication.AlwaysUseUnicode]|{excerpt-include:WordApplication.AlwaysUseUnicode|nopanel=true}| |[LicenseKey|WordApplication.LicenseKey]|{excerpt-include:WordApplication.LicenseKey|nopanel=true}| |[Preserve|WordApplication.Preserve]|{excerpt-include:WordApplication.Preserve|nopanel=true}| |[Version|WordApplication.Version]|{excerpt-include:WordApplication.Version|nopanel=true}| {methods} ||Name||Description|| |[Create()|WordApplication.Create()]|{excerpt-include:WordApplication.Create()|nopanel=true}| |[Open(String)|WordApplication.Open(String)]|{excerpt-include:
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)

...

nopanel

...

...

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

...

WordApplication.Open(System.IO.Stream)

...

nopanel

...

...

Excerpt Include
WordApplication.Open(WordTemplate)

...

WordApplication.Open(WordTemplate)

...

nopanel

...

...

...

Excerpt Include
WordApplication.Save(Document,

...

String)

...

WordApplication.Save(Document,

...

String)

...

nopanel

...

...

...

Excerpt Include
WordApplication.Save(Document,

...

System.IO.Stream)

...

WordApplication.Save(Document,

...

System.IO.Stream)

...

nopanel

...

...

...

...

...

Excerpt Include
WordApplication.Save(Document,

...

System.Web.HttpResponse,

...

String,

...

Boolean)

...

WordApplication.Save(Document,

...

System.Web.HttpResponse,

...

String,

...

Boolean)

...

nopanel

...

...

...

...

...

...

Excerpt Include
WordApplication.Save(Document,

...

System.Web.HttpResponse,

...

String,

...

Boolean,

...

String)

...

WordApplication.Save(Document,

...

System.Web.HttpResponse,

...

String,

...

Boolean,

...

String)

...

nopanel

...

...

Excerpt Include
WordApplication.WordApplication()

...

WordApplication.WordApplication()

...

nopanel

...

true
Extensionmethods

...

...

Excerpt Include
SharePointIntegration.Open(WordApplication,

...

Microsoft.SharePoint.SPDocumentLibrary,

...

String)

...

SharePointIntegration.Open(WordApplication,

...

Microsoft.SharePoint.SPDocumentLibrary,

...

String)

...

nopanel

...

...

...

Excerpt Include
SharePointIntegration.Open(WordApplication,

...

Microsoft.SharePoint.SPListItem,

...

String)

...

SharePointIntegration.Open(WordApplication,

...

Microsoft.SharePoint.SPListItem,

...

String)

...

nopanel

...

...

...

...

...

Excerpt Include
SharePointIntegration.Save(WordApplication,

...

Document,

...

Microsoft.SharePoint.SPDocumentLibrary,

...

String,

...

Boolean)

...

SharePointIntegration.Save(WordApplication,

...

Document,

...

Microsoft.SharePoint.SPDocumentLibrary,

...

String,

...

Boolean)

...

nopanel

...

...

...

...

Excerpt Include
SharePointIntegration.Save(WordApplication,

...

Document,

...

Microsoft.SharePoint.SPListItem,

...

String)

...

SharePointIntegration.Save(WordApplication,

...

Document,

...

Microsoft.SharePoint.SPListItem,

...

String)

...

nopanel

...

true

...