This is the c# code to generate word doc
public ActionResult SummaryExportToWord()
{
Response.Buffer = true;
//Response.AddHeader("content-disposition", "attachment; filename=ContactDetail.xls");
//Response.ContentType = "application/ms-excel";
Response.AddHeader("content-disposition", "attachment; filename=Exposure_Summary.doc");
Response.ContentType = "application/ms-word";
Response.Charset = "";
return View();
}
Image can't add to the word file. This is the image html:-

The error is "The linked image cannot be displayed. The file may have been moved". How to show image in doc file from Html5?

Maen BadwanPosted Sep 22, 2016, 5:07 AM
Also, when exactly do you get the error "The linked image cannot be displayed. The file may have been moved"?
Do you get it when calling the following line:
Response.AddHeader("content-disposition", "attachment; filename=Exposure_Summary.doc");