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

Free Support Forum - aspose.com

Word Document Save Method : No overload for method 'Save' takes 4 arguments

We are migrating from Aspose.Word 9.7 to Aspose.Word 11.2.
While migrating to new version we are getting the below compilation error.
"No overload for method ‘Save’ takes 4 arguments "

Below is the sample code which we are using :

// strFilePath - Path of word document .
Stream streamDoc = File.OpenRead(strFilePath);
Document wordDoc = new Document(streamDoc);
DocumentBuilder builder = new DocumentBuilder(wordDoc);
builder.MoveToSection(0);
builder.InsertHtml(content);
// contentSection - Content which we want to add into the word file
if (!string.IsNullOrEmpty(contentSection))
{
    builder.MoveToSection(1);
    builder.InsertHtml(contentSection);
}
// response is httpResponse Object
wordDoc.Save(response, fileName, ContentDisposition.Inline, null);

Can you please provide us the alternative code implementation for same.

Hi Kanwar,

Thanks for your inquiry. Please read the following article for your kind reference.
How to Migrate to Aspose.Words 9.2 or Higher

Your code is correct, please check the last line of the code; the save method.

// strFilePath - Path of word document .
Stream streamDoc = File.OpenRead("file....");
Document wordDoc = new Document(streamDoc);
DocumentBuilder builder = new DocumentBuilder(wordDoc);
builder.MoveToSection(0);
builder.InsertHtml("**html**");
// contentSection - Content which we want to add into the word file
if (!string.IsNullOrEmpty(""))
{
    builder.MoveToSection(1);
    builder.InsertHtml("**html**");
}
// Send the document in Word format to the client browser with an option to save to disk or open inside the current browser.
wordDoc.Save(Response, "AsposeOut.doc", ContentDisposition.Inline, null);

I suggest you, please read following documentation links for your kind reference and let us know if you have any more queries.
https://docs.aspose.com/words/net/save-a-document/
https://reference.aspose.com/words/net/aspose.words/document/save/
https://reference.aspose.com/words/net/aspose.words/contentdisposition/
https://docs.aspose.com/words/net/