This project has moved and is read-only. For the latest updates, please go here.

Show PowerPoint slide embedded in WinForm control

Feb 20, 2013 at 8:34 AM
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!
Feb 20, 2013 at 1: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.

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.

Feb 20, 2013 at 1: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 ( 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!