|
|
Programmer's Reference >
WordApplication API >
WordApplication > Save
Save Method
Signature:
public void Save ( Document doc
, System.Web.HttpResponse response
, String fileName
, boolean openInBrowser
)
Description:
Streams a Document to an HttpResponse with the option of having it open in the user's web browser. The fileName specified will appear in the browser window. The preserve flag is used to specify the way WordWriter will save the document. When the preserve flag is set to true, WordWriter attempts to preserve all formatting and features that it doesn't directly support. This includes Fields, Footnotes, Hyperlinks, Comments, and Anchored Images. When the preserve flag is false, only those features directly supported by WordWriter will be preserved. This includes all Tables, Lists, Headers and Footers. The main advantage to setting the preserve flag to false is that it can significantly reduce the file size of the resulting Word document. This is recommended if it is known that only supported features are in the document.
Parameters:
|
doc |
The Document to save. |
|
response |
The HTTPResponse to write the document to. |
|
fileName |
The filename to display in the browser window. |
|
openInBrowser |
Whether to open the document in the browser window (true) or have it open in Word (false). |
Exceptions:
|
System.Exception |
Thrown if there is an error streaming the document. |
Examples:
[csharp]
oWordApplication.Save(oDocument, true, Page.Response, "sample.doc", true);
[vbnet]
oWordApplication.Save(oDocument, True, Page.Response, "sample.doc", True)

Copyright 2006 © SoftArtisans, Inc. All Rights Reserved.
|
|
|