Could not overload Save Mehtod while mail merging

Hi All,

I have a problem in overloading Save Method after mail merging. i want the Save method in the following manner. I want to Send the document in Word format to the client browser with an option to save to disk or open inside the current browser.

doc.Save(MyDir+“out put file Name.doc”, ContentDisposition.Inline, null);

i have also opened the Aspose.words Example file in my PC and found same error saying “Undefined Save method”. finally i have looked into the Metadata file of Document object and found following Save Methods:

public SaveOutputParameters Save(string fileName);
public SaveOutputParameters Save(Stream stream, SaveFormat saveFormat);
public SaveOutputParameters Save(Stream stream, SaveOptions saveOptions);
public SaveOutputParameters Save(string fileName, SaveFormat saveFormat);
public SaveOutputParameters Save(string fileName, SaveOptions saveOptions);

After seeing above methods accepting maximum of only two parameters i have found (in doubt) that i cannot overload more than two parameters in save method. Now my question is how can i customize the save method to fulfill my need? i have also attached my code snipped for reference.

please if any one can help me. I know that this may be simple but for me this is important.

thank you for your help.

regards to All

Hi,

Thanks for your inquiry and sorry for the delayed response.

Most likely you are using Aspose.Words .NET 3.5 Client Profile that is why this overload of Save method is not available .NET 3.5 Client Profile excludes System.Web and therefore HttpResponse is not available. This is entirely by design. If you need to use Aspose.Words in ASP.NET application, I would recommend you use .NET 2.0 and the following overload of Save method:

Moreover, I would suggest you please read the following article which outlines how to send a document to client’s browser:

I hope, this helps.

Best Regards,

Hi,

Thanks for your reply. your solution helped me. I have just changed the DLL file to .NET 2.0 DLL and the overload method worked. Thanks once again.

looking forward for such solutions in future.


regards

Hi,


Thanks for your feedback. Please let us know any time you have any further queries. We’re always glad to help you.

Best Regards,