none
SharePoint based form submit to C# app that creates Powerpoint 2007 presentation for user download. RRS feed

  • Question

  • I have Written a simple console program that generates a Powerpoint Presentation but i need to be able to have objects (text,pictures etc) set via an asp.net form based on a Sharepoint page,  Currently this saves a presentation anywhere i tell it too, but i require it to output as a user download from Sharepoint.  I'm looking for any pointers on how to go about doing such a thing.  I understand the use of Forms and Requesting Parameters etc but not sure on how to go about having the program run server side and output a downloadable file.

    Any Help, greatly appreciated.

    Wednesday, November 13, 2013 4:08 PM

Answers

  • How do you generate Powerpoint File in the console program?

    >> Presentation but i need to be able to have objects (text,pictures etc) set via an asp.net form based on a Sharepoint page <<

    Do you mean you want to insert objects into Powerpoint? If so, you can use Open XML on the server side to manipulate the presentation. You can refer to sample below to insert table to presentation:
    How to add a table with rows to PowerPoint using open xml

    You can get more information about Open XML from link below:
    Welcome to the Open XML SDK 2.5 for Office

    >>but i require it to output as a user download from Sharepoint<<
    You can use HttpResponse.TransmitFile to writes the specified file directly to an HTTP response output stream.

    BTW, Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.(Refer to Considerations for server-side Automation of Office)

    Best regards
    Fei

     


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, November 15, 2013 12:35 PM
    Moderator