I applied the snippet of sample code provided in the documentation for saving presentations to create a blank slide and save it. However I am not prompted when I step through and run the code. The code is below. I've commented out hte response.end statement since it was generating a "thread aborted error". Note: the form that this code is in is being called via AJAX.
Ajax code:
function getPrintableHTML()
{
var printHTML
//alert(parent.frames[1].document.documentElement.innerHTML);
printHTML=encodeURIComponent("" + parent.frames[1].document.documentElement.innerHTML + "");
var params = "&printHTML=" + encodeURIComponent(printHTML);
//var params = "&printHTML=1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111";
// Make the Ajax call and pass in the parameters.
ajaxCall = makeSyncAjaxTextRequest("PowerpointConverter.aspx", params);
}
function makeSyncAjaxTextRequest(url, params)
{
getHTTPRequestObject();
XMLHttp.open("POST", url, false);
//XMLHttp.setRequestHeader("Content-Type", "text/html");
XMLHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
XMLHttp.setRequestHeader("Content-length", params.length);
XMLHttp.send(params);
return XMLHttp.responseText;
}
Thanks
Dim pres As Presentation = New Presentation()
'....do some work here.....
Try
'Setting the content type of the Http Response
Me.Response.ContentType = "application/vnd.ms-powerpoint"
'Appending the header of the Http Response to contain the presentation file name
Me.Response.AppendHeader("Content-Disposition", "attachment; filename=demo.ppt")
'Flushing the buffers of Http Response
Me.Response.Flush()
'Accessing the output stream of Http Response
Dim st As System.IO.Stream = Me.Response.OutputStream
'Saving the presentation to the output stream of Http Response
pres.Write(st)
'Closing the Http Response
'Me.Response.End()
Catch Err As Exception
Throw Err
End Try