Message-ID: <446978711.10057.1711710885743.JavaMail.web05$@web05> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_10056_1934129050.1711710885743" ------=_Part_10056_1934129050.1711710885743 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html WordApplication.Save(Document, System.Web.HttpResponse, String, = Boolean, String)

WordApplication.Save(Document, System.Web.HttpResponse, String, Boo= lean, String)

Description

=20

Streams a Document to an HttpRespo= nse with the option of having it open in the user's web browser. The fileNa= me specified will appear in the browser window. In addition, the content-ty= pe to use when streaming the file is specified.

=20
C#
=20
 public void Save(Document doc, System.Web.HttpResponse response, System.St=
ring fileName, boolean openInBrowser, System.String contentType)
=20
=20
vb.net
=20
Public Sub Save(ByVal doc As Document, ByVal response As System.Web.HttpRes=
ponse, ByVal fileName As String, ByVal openInBrowser As Boolean, ByVal cont=
entType As String)
=20
=20

Parameters

=20
doc
The=20 Document to save.=20
response
The HTTPResponse to write the document = to.=20
fileName
The filename to display in the browser = window.=20
openInBrowser
Whether to open the document = in the browser window (true) or have it open in Word (false).=20
contentType
The content-type to stream the fi= le as.=20

Exceptions

=20
System.Exception
Thrown if there is an e= rror streaming the document.=20

Remarks

=20

For the document to open in the browser window, the "Browse in same= window" option must be enabled for .doc file types on the client mach= ine.

=20

The W= ordApplication.Preserve property is used to specify the way WordWriter = will save the document. When the preserve property is set to t= rue, WordWriter attempts to preserve all formatting and features that it do= esn't directly support. This includes Fields, Footnotes, Hyperlinks, Commen= ts, and Anchored Images. When the preserve property is false, = only those features directly supported by WordWriter will be preserved. Thi= s includes all Tables, Lists, Headers and Footers.

=20

Examples

=20
C#
=20

          app.Preserve =3D true;
          app.Save(doc, Page.Response, "sample.doc", false, "=
;application/x-msdownload");
        
=20
=20
vb.net
=20

          app.Preserve =3D True
          app.Save(doc, Page.Response, "sample.doc", False, "=
;application/x-msdownload")
        
=20
------=_Part_10056_1934129050.1711710885743--