Message-ID: <273968151.8445.1711646730331.JavaMail.web05$@web05> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_8444_945154430.1711646730331" ------=_Part_8444_945154430.1711646730331 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Sends the generated Word binary file to the specified System.IO.Stream or, a class derived from <= code>System.IO.Stream (for example, System.IO.FileStream).
=20public void Save(System.IO.Stream outputStream)=20
Public Sub Save(ByVal outputStream As System.IO.Stream)=20
System.IO.Stream
object (for example,=20
Response.OutputStream
) or, a class derived from=20
System.IO.Stream
(for example,=20
System.IO.FileStream
)=20
Save
will throw this exception if=20
null
(C#) or=20
Nothing
(VB.NET) is passed to the method.=20
If you pass =
Save a System.IO.FileStream
, WordWriter will save the gene=
rated file on the server. If you pass Save
Response.Outp=
utStream
, WordWriter will stream the the generated file to the clien=
t.
You can call Save
more than once for a single instance of <=
a href=3D"/display/WW8/WordTemplate" rel=3D"nofollow">WordTemplate. Thi=
s allows you to save more than one copy of a generated file, and/or both sa=
ve the file on the server and stream it to the client.
//--- Open a FileStream object, pass it to //--- the Save method, and close the FileStream object. FileStream oFileStream =3D new FileStream(@"c:\temp\StreamOu= tput.doc", FileMode.Create); oWW.Save(oFileStream); //--- Could put this in a finally block if(oFileStream!=3Dnull) oFileStream.Close();=20
'--- Open a FileStream object, pass it to '--- the Save method, and close the FileStream object. Dim oFileStream As New FileStream("c:\temp\StreamOutput.doc&= quot;, _ FileMode.Create) oWW.Save(oFileStream) '--- Could put this in a finally block If Not oFileStream Is Nothing Then oFileStream.Close() End If=20