This statement is not working on machine with word 2003. It runs for a wile the hourglass appears and i can see the word loaded in taskmanager but the document is not opening. Is there a different syntax for word 2003
I tried this.syntax But this is always prompting a "Open / Save / cancel " dialog
Hi downloaded new version and got a license from you.
But this version is always throwing “Open/Save/Cancel” dialog when document.save method is called. with both inline and inword options.
This was not happening in older version. that i was using.
Also I am i now getting “Cannot be opened because there are problems with the contents” Error when i hit the open button. The error details says. “The file is corrupt and cannot be opened”
This was not hppening in older version too.
Also I am now not able to go back the older version. “I am now getting Coluld not load file or assembly aspose.word, version 9.5.0 , error”
Please help!!!
To prevent error “Cannot be opened because there are problems with the contents” getting please use Reponse.end() after Save method calling (doc.Save(Response, “out.doc”, ContentDisposition.Inline, null);).
As per Open/Save/Cancel dialog - that is standard dialog when save method is called. There is a way to prevent its opening on a client site through ie setting https://forum.aspose.com/t/86985. But not for the server side.
Thanks for your request. Just to clarify a bit, the Save doc.Save(Response, “out.doc”, ContentDisposition.Inline, null); method works like the following code.
Aspose.Words.Document doc = new Aspose.Words.Document();
Aspose.Words.DocumentBuilder builder = new Aspose.Words.DocumentBuilder(doc);
builder.Write("Hello world!!!");
MemoryStream stream = new MemoryStream();
doc.Save(stream, SaveFormat.Doc);
Response.Clear();
// Specify the document type.
Response.ContentType = "application/word";
// 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=MyDocument.doc");
// Another option could be:
Response.AddHeader("content-disposition", "inline; filename=out.doc");
// Get data bytes from the stream and send it to the response.
byte[] bytes = stream.GetBuffer();
Response.BinaryWrite(bytes);
Response.End();
When you send file to client’s browser open/save/cancel dialog is always displayed.
Best regards.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
Enables storage, such as cookies, related to analytics.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.