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.
ReplyDeletenow, end 2012, I was having the exact same issue.
ReplyDeleteVS2010 and office 2010 btw.
I've been pondering for a little more then 10mins, more like a day+, untill I found this post.
Thank you for actually POSTING your 'solution'.
Found a lot of threads with similiar issues, with no answer posted...
So thank you from way in to the future!
oops... spelling-fail...
DeleteGreat Solutions!!!! Thanks
ReplyDeleteThanks for the tip!
ReplyDeleteI found that I also had to install "Microsoft Forms 2.0 .NET Programmability Support" as well. It's located under "Office Tools".
Hope this tip saves someone time.