We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How to open a merged doc in browser

wen i give the following code :

doc.save("mytest.doc", saveformat.doc, aspose.words.savetype.openinbrowser, response)

i get a dialog for open/save .How do i open the word doc in browser as we do in pdf

for eg :

pdf.Save("Aspose.Word.sample.pdf", Aspose.Pdf.SaveType.OpenInBrowser, Response)


Thank you for your interest in Aspose.Words. I think that this is impossible.

This save method works like the following code.

MemoryStream stream = new MemoryStream();

doc.Save(stream, SaveFormat.Doc);

byte[] bytes = stream.GetBuffer();


//Specify the document type.

Response.ContentType = "application/msword";

//Other options:

//Response.ContentType = "text/plain"

//Response.ContentType = "text/html"

//Specify how the document is sent to the browser.

Response.AddHeader("content-disposition", "attachment; filename=test.doc");

//Another option could be:

//Response.AddHeader "content-disposition","inline; filename=MyDocument.doc";

//Get data bytes from the stream and send it to the response.



Best regards.