We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Save To Stream

Thread ID:





56605 Feb 16,2007 11:10 PM UTC Feb 17,2007 10:23 AM UTC ASP.NET Web Forms (Classic) 1
Tags: DocIO
Jay Slusher
Asked On February 16, 2007 11:10 PM UTC

My application needs to save documents created by DocIO using a UNC path. Since the standard IWordDocument.Save Method (String, FormatType)does not support UNC paths, I would like to use the IWordDocument.Save Method (Stream, FormatType) method since the stream does support the UNC path.

In reading the help, it refers to a "Save To Stream" sample but I can't find it in any of my samples with or on your web site. Would you please send me the sample or provide a code snippet demonstrating how to use the Save method with a stream method.


Melba Winshia [Syncfusion]
Replied On February 17, 2007 10:23 AM UTC

Hi Jay,

You can use the following code snippets to save the document to a Memory Stream.


//Create MemoryStream for storing the document.
MemoryStream memStream = new MemoryStream();
//Save document to stream.
document.Save ( memStream , FormatType.Doc );
memStream.Seek ( 0 , SeekOrigin.Begin );

//Create a FileStream
FileStream fs = new FileStream("Sample.doc",FileMode.Create);

//Close streams.

Here is the sample for your reference:


Kindly take a look at the sample above and let me know if you have any other questions.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon