Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems with COM - Error HRESULT E_FAIL has been returned

Status
Not open for further replies.

btaber

Programmer
May 26, 2002
307
0
0
US
I was designing an application that workd with PowerPoint creating slides. It was working fine for a while, now all of the sudden I am getting "Error HRESULT E_FAIL has been returned from a call to a COM component.". I have tried rebooting the computer and no luck. I have no idea where to start... the code that causes the error now is:

Code:
Dim ppApp As Microsoft.Office.Interop.PowerPoint.Application = Nothing
Dim prsPres As Microsoft.Office.Interop.PowerPoint.Presentation = Nothing

ppApp = New Microsoft.Office.Interop.PowerPoint.Application
ppApp.Visible = Microsoft.Office.Core.MsoTriState.msoTrue
ppApp.WindowState = Microsoft.Office.Interop.PowerPoint.PpWindowState.ppWindowMinimized

as soon as I try to work with ppApp, it raises the error. Any ideas anyone?

 
Have you changed anything recently, such as:

- Upgraded Ms Office to a newer version
- Upgraded Windows to a newer version
- Moved to a new/different machine
- applied any patches/updates to Office, Windows or Visual Studio?



I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day! Ye has a choice: talk like a pira
 
I haven't updated or changed anything... it is also the same program I created that was working before... I have tried to reinstall Office, no luck... I also tried to execute under another user name, same result... I tried my same program on another machine and it works....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top