But when I ran this code:
ApplicationClass powerpoint = new ApplicationClass();I got this exception:
Presentation ppt = powerpoint.Presentations.Add(MsoTriState.msoFalse);
Error HRESULT E_FAIL has been returned from a call to a COM componentI've been looking for an answer for a while (for at least 10 minutes!) when it was finally time to ask it in a forum.
So thanks to this post I found out that you must install the Visual Basic for Applications from the Microsoft Office CD in order to actually use the DLLs Microsoft supplies:
This solution also applies for developing with other Office products such as Word, Outlook and others.

This sometimes happened when a "not implemented" exeption was thrown as well.
ReplyDelete