Using mail merge- Creating and Opening a word file simultaneously or one after another

hi there… I am trying to create a word file and soon after creation i am trying to open it as well…
so far there are only four methods to save a Document object none of them support feature to save and then open after that…
Could you pleae help me in this regard
My code is here

Document doc = custom_method("text replacing mail merge field");
doc.Save(savedFileName, SaveFormat.Doc);
Response.WriteFile(savedFileName);
Response.End();

…this does not work… and throws an error. Perhaps doc is still busy in writing the file and does not release the file… and response.write is trying to open it… but in any case it does not even save the file and throws a .net file system error on respose.write file line.

Hi

Thanks for your inquiry. As I can see you need to send the document to client’s browser. If so, Please use the following overload of Save method:
https://reference.aspose.com/words/net/aspose.words/document/save/
Best regards,

Thanks for a Quick Reply…
The version of Asposxe i am using is 5.3.0.0 is this the latest one? as I dont see that overload? How do I get an upgrade if its not the latest one… and also would there be any extra cost associated with that…??

Hi

Thanks for your inquiry. No 5.3.0.0 is not the latest version. The latest version is 9.4.0. you can download it from here:
https://releases.aspose.com/words/net
Yes, I suppose you will need to renew your subscription to use the latest version. You should ask for details of subscription renewal process in Aspose.Purchase forum. My colleagues from sales team will be glad to help you.
Aspose.Words 5.3.0.0 also has the similar method. So you can try using it:

doc.Save("test.doc", SaveFormat.Doc, SaveType.OpenInWord, Response);
Response.End();

Best regards,