Free Support Forum -

Response object in the save method

I have this following code snippet

Dim word As Aspose.Word.Word = New Aspose.Word.Word
Dim doc As Document = word.Open(“c:\myDoc.doc”)
doc.Save(“myNewDocument.doc”, SaveFormat.FormatDocument, SaveType.OpenInBrowser, Me.Response)

I was wondering what I could do to allow a redirect to the same page, but with a mode in the URL, ie instead of Me.Response, I may do Me.Response.Redirect(“webform1.aspx?mode=done”).

If anyone could shed some light on this, it would be greatly appreciated.

Thanks in advance.

I’m not exactly sure what do you want to achieve so cannot give any advice.

You only need to pass Response into the Save method if you want the document streamed to the client browser.

is there any equivalent syntax in
i want to modify the doc using mail merge and open save dialog box, to save the doc according to my preference.

Do you mean you want to send the document to the client browser so it opens Save As dialog box?

I suggest you see the demo source code included with the product. There is a VB.NET demo and it does just that. You send a document to the client browser and it brings a prompt where you can select to save the file.