Hi,
Could anyone please tell me how to download an image and embed in PPT?
I tried using the below code:
sFileName = ThresholdChartPath + ".jpg";
Response.Clear();
Response.ClearHeaders();
Response.ClearContent();
Response.Buffer = true;
Response.AddHeader("content-disposition", "attachment;filename=SavetoPPT.ppt");
Response.ContentType = "application/vnd.ms-powerpoint";
String imagepath = "<img src='"+ sFileName + "' width='780' height='480'/>";
Response.Output.Write(imagepath);
Response.Flush();
Response.End();
and also the code shown below:
sFileName = ThresholdChartPath + ".jpg";
_powerPoint = new PowerPoint.Application();
_presentation = _powerPoint.Presentations.Add(Microsoft.Office.Core.MsoTriState.msoCTrue);
int _slideNo = 0;
_slideNo++;
var slide = _presentation.Slides.Add(_slideNo,
Microsoft.Office.Interop.PowerPoint.PpSlideLayout.ppLayoutBlank);
slide.Shapes.AddPicture(sFileName,Microsoft.Office.Core.MsoTriState.msoTrue,Microsoft.Office.Core.MsoTriState.msoTrue, 2, 2, 710, 530);
releaseObject(_powerPoint);
releaseObject(_presentation);
It works fine in my local machine.
But i'm not able to download it from the server side after the website is published in the server.
Anyone please help it.
Thanks in advance.