Hi,
How to store word document as a mhtml in memory stream…
and how to retrive html word document from memory stream and write in stream reader…
Pls provide the solution</div>
Thanks
Narendran
Hi,
Hi Narendran,
Thanks for your inquiry. Please use following code example to export Word document into memory stream. Hope this helps you.
Document doc = new Document(MyDir + "in.docx");
MemoryStream memoryStream = new MemoryStream();
doc.Save(memoryStream, SaveFormat.Mhtml);
memoryStream.Seek(0, SeekOrigin.Begin);
StreamReader streamReader = new StreamReader(memoryStream);
Thanks for reply,
Hi Narendran,
Thanks for your inquiry. Your query seems to be related to .NET API. If you want to save memory stream to disk, please use System.IO.File.WriteAllBytes method.
Could you please share some more detail about your query what exact you want to achieve using Aspose.Words? We will then provide you more information about your query.
Document doc = new Document(MyDir + "in.docx");
MemoryStream memoryStream = new MemoryStream();
doc.Save(memoryStream, SaveFormat.Mhtml);
memoryStream.Position = 0;
System.IO.File.WriteAllBytes(MyDir + @"output.mhtml", memoryStream.ToArray());
Thanks for reply,
Hi Narendran,