This project has moved. For the latest updates, please go here.

Show PowerPoint slide embedded in WinForm control

Feb 20, 2013 at 7:34 AM
Hi
Your component looks very nice but I am not exactly sure if it can help me.

I have a task to generate PowerPoint slides and dynamically add different charts with certain values. And those charts must be formatted programmatically (like setting the font size, chart size, values, and so on). I guess this part can be achieved with your component, right?

The next part is, that I should be able to show these slides directly within my WinForms application, although an export as PowerPoint file should be possible too.

Do you know how I could get this task done? Is it somehow possible to embed the PowerPoint within Windowsforms, maybe within a WebBrowser control, or can a PowerPoint viewer be integrated in the application? The users of the application will always have PowerPoint installed on their computers. What would be the best way? Does your component even have a solution for this?

Thank you for your suggestions!
Coordinator
Feb 20, 2013 at 12:12 PM
the powerpoint viewer is not accesable via code.

this is an example for excel and the interop assemblies but easy to modify i find.
http://www.codeproject.com/Articles/15760/How-to-Integrate-Excel-in-a-Windows-Form-Applicati

another way is to do that is some Win32 API functions (FindWindow and SetParent) to change the parent window from desktop to your application or container control inside your application. easier but an unsupported scenario, this means it works but sometimes with some scary side effects.

Sebastian
Feb 20, 2013 at 12:45 PM
Hi Sebastian

Thank you very much for your fast answer!

I have already seen the codeproject article. this solution is based on the WebBrowser control. If I understood it right this is not possible with versions after 2007, since there the documents are opend in the real word or powerpoint application instead the WebBrowser control. So I guess I have to try the 'FindWindow' thing. Or maybe just use the expensive EDraw-activex control (http://www.edrawsoft.com/download-office-component.php) which seems to work perfectly but is expensiv. I just can not belive that there are no other such free activex components or 'easy' soloutions to build something similar...
Anyway, thanks again for your help!