Unable to import PowerPoint presentation
Wed, 09/29/2010 - 10:02
Hi,
since upgrading to Professinal Version I get an Error Message while attempting to import a Powerpoint file.
"Unable to import PowerPoint presentation. Error HRESULT E_FAIL has been returned from a call to a COM component."
What am I to do?

That's annoying.
-> Which version of Powerpoint do you use?
-> Can you try to import a small powerpoint file (1 slide with one text) and tell me if it works.
-> Can you try to export as Powerpoint, to check if it works.
Sorry Alain,
I tried just a simple Textslide and used Powerpoint 2007 and Powerpoint 2000. I just tried the export feature, which will bring up the Error Message "Unable to export PowerPoint presentation. Error HRESULT E_FAIL has been returned from a call to a COM component."
What else can i do?
Please download the following file:
http://www.slide-effect.com/tmp/check_ppt.exe
Then run it and send me back the text output.
Hi Alain,
this is what the check_ppt.exe printed out:
output:
Check CURRENT_USER...
Found nothing
Check LOCAL_MACHINE...
Found something: C:\PROGRA~1\MICROS~4\Office12\POWERPNT.EXE
Check if file exists
Found.
Check version
major: 12
minor: 0
Sincerely
Janez
Ok. Now can you do the following:
- Open Start menu.
- Go to Slide effect Shortcut, then right click and choose "Properties"
- Click on button "Open Target Directory" (or something similar)
(An explorer will open on Slide Effect directory)
- Check if the following files are listed (and if their size are correct):
-> office.dll 219kb
-> Microsoft.Office.Interop.PowerPoint.dll 219k
If these files are not available or if the size is not the same, please download again 1.7.5 and re-install it.
If these files are ok, let me know and I will send you a program to diagnose a bit more what's going on (by tomorrow).
Hi Alain,
if have checked the files and found them both in the SlideEffect directory in the assigned size. Nevertheless I have reinstalled the 1.7.5 also, but nothing changed regarding the Error Messages. So we need to go on with this.
Let me know, what you suggest next.
Sincerely
Janez
Well, I just enhanced the small diagnose tool, please download it, uncompress it, and then double-click on "check_ppt.exe" and give me back the result here.
download link: http://www.slide-effect.com/tools/checkPPTex.zip
Hi Alain,
here is what check_PPT.exe has printed out:
output:
Check CURRENT_USER...
Found nothing
Check LOCAL_MACHINE...
Found something: C:\PROGRA~1\MICROS~4\Office12\POWERPNT.EXE
Check if file exists
Found.
Check version
major: 12
minor: 0
Connect to PPT DLL
Connected to PPT DLL
Connect Error
System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.
at Microsoft.Office.Interop.PowerPoint.Presentations.Open(String FileName, MsoTriState ReadOnly, MsoTriState Untitled, MsoTriState WithWindow)
at check_ppt.Form1..ctor()
Error HRESULT E_FAIL has been returned from a call to a COM component.
at Microsoft.Office.Interop.PowerPoint.Presentations.Open(String FileName, MsoTriState ReadOnly, MsoTriState Untitled, MsoTriState WithWindow)
at check_ppt.Form1..ctor()
I also used the attached DLL-Files to overwrite the ones currently present in the Slide-Effect directory. The Error messages while importing or exporting are still the same. I also attempted to import the attached test.ppt with the same Error Messages like before. This must be a living bug - lets use some BugExSpray. What am I to do next?
Sincerely
Janez
Ok, I think I found the issue:
It seems you did not install VBA (Visual Basic For Application) when installing Powerpoint.
So, if it is possible for you, please do the following:
- Open Start Menu
- Open Control Panel
- Click "Add or Remove Program"
- Choose Microsoft Office on the list of installed programs, and click "Change" button.
- Then an office dialog should open asking you what changes you want to do: select "Add or Remove Features"
- On the tree, select "Office Shared Features" then "Visual Basic for Applications": change it to "Run from my computer"
- Click Continue and wait until office has finished to install.. reboot and try again to import a PPT presentation on Slide Effect.
I really think it comes from something missing on your Powerpoint installation.
Really hope it resolves your issue.
Hi Alain,
that was it. Problem solved. Thanks so much.
Good to hear! thanks for your patience.
Hi Alain,
I am now meeting with the similar problem as Start4Life was.
My error message is the same with his. I debugged my code and this error reports when it comes to this line of code (C#).
m_presentation = (PowerPoint_Class.Application)m_pptAp.Presentations.Open(m_originalFileName,
MS_FALSE, MS_FALSE, MS_FALSE);
Please ignore the grammer issue of this line of code. It does not look good since I only copied it from the whole cs file of my project.
I also tried your checkPPTex.zip and following output is printed.
output:
Check CURRENT_USER...
Found nothing
Check LOCAL_MACHINE...
Found something: C:\PROGRA~1\MICROS~2\Office12\POWERPNT.EXE
Check if file exists
Found.
Check version
major: 12
minor: 0
Connect to PPT DLL
Connected to PPT DLL
Presentation Opened
Slide Number: 3
Slide Index: 0
Shape Count: 3
Shape Index: 0
Shape Is Text
Text is:tralala
Slide Index: 1
Shape Count: 3
Shape Index: 0
Shape Is Text
Text is:Title.
Shape Index: 1
Shape Is Text
Text is:Pouet
pouet
Slide Index: 2
Shape Count: 3
Shape Index: 0
Shape Is Text
Text is:zomg
Shape Index: 1
Shape Is Text
Text is:It is not working
Could you please give me some guide on this problem? Thanks in advance.
If you need more information besides above, please let me know and I can try to collect more findings.
Well, as I understand, you are not using Slide Effect, it is a pure c# problem?
Here follow the code snippet where I open the PPT file:
try { result += "Connect to PPT DLL\r\n"; PP.Application pp = new PP.Application(); result += "Connected to PPT DLL\r\n"; PP.Presentation p = pp.Presentations.Open("test.ppt", Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoFalse); result += "Presentation Opened\r\n"; } catch (Exception e) { result += "Connect Error\r\n"; result += e.ToString() + "\r\n"; result += e.Message + "\r\n"; result += e.StackTrace + "\r\n"; }If you want, I can send you the source code of CheckPPT so you can fully compare your code to my code to find the differences.
Thank you Alain. But is your code invoking Office PPT 2007 APIs? I found the new PP.Application() is so different from mine (PowerPoint_Class.Application app).
And what is my ppt application opening is the html files because I am using it to re-save the html files to ppt file.
If your code can handle opening html to ppt, I can send you my original ppt file. You can first save it to html format and then use your code to re-save it to ppt, then you should find there is a problem.
Is there a button to attach a file here?
This code works with Office 2000, XP, 2003, 2007 and Office 2010.
Using this code you can open ppt or pptx file. I never tried with html file, and I don't think it will handle html as it is not made for.
Hi Alain,
In my local(when I run the application through VS2005) its PPT is working, but when I publish the website in my local and run the PPT export getting the below error,
Error HRESULT E_FAIL has been returned from a call to a COM component.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Runtime.InteropServices.COMException: Error HRESULT E_FAIL has been returned from a call to a COM component.
I ran the one what you have given earlier is check_PPT.exe, and got the below description
output:
Check CURRENT_USER...
Found nothing
Check LOCAL_MACHINE...
Found something: C:\PROGRA~1\MICROS~2\OFFICE11\POWERPNT.EXE
Check if file exists
Found.
Check version
major: 11
minor: 0
Connect to PPT DLL
Connected to PPT DLL
Connect Error
System.Runtime.InteropServices.COMException (0x80004005): PowerPoint could not open the file.
at Microsoft.Office.Interop.PowerPoint.Presentations.Open(String FileName, MsoTriState ReadOnly, MsoTriState Untitled, MsoTriState WithWindow)
at check_ppt.Form1..ctor()
PowerPoint could not open the file.
at Microsoft.Office.Interop.PowerPoint.Presentations.Open(String FileName, MsoTriState ReadOnly, MsoTriState Untitled, MsoTriState WithWindow)
at check_ppt.Form1..ctor()
so please guide me what to do.
Hi,
I am not sure I understand what you are trying to do. What do you mean by "Publish the website in my local"?
Are you trying to save the PPT file in a distant location from your computer?
Please give me a bit more details.
Hi,
I just downloaded a trial and went right to professional because it looked like I needed the professional version (from reading your help guide) in order to import PowerPoint into slide effect for an urgent project I am working on.
However after spending money on the full version I still get the same error message telling me that PowerPoint is not installed on my PC. It is I have PowerPoint in my edition of Home / Student Office 2010.
I have downloaded your PowerPoint checker above, here is the results of running the exe file:
output:
Check CURRENT_USER...
Found nothing
Check LOCAL_MACHINE...
Found nothing
Connect to PPT DLL
Connect Error
System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {91493441-5A91-11CF-8700-00AA0060263B} failed due to the following error: 80040154.
at check_ppt.Form1..ctor()
Retrieving the COM class factory for component with CLSID {91493441-5A91-11CF-8700-00AA0060263B} failed due to the following error: 80040154.
at check_ppt.Form1..ctor()
I have tried pressing CHANGE in Control Panel > Programs & Features > Office 2010 and am not met with a dialoge bos you mentioned previously. Just a yellow option to REPAIR Office 2010 which I have run to no avail.
I would be grateful for a fast reply as I'm feeling a little aggrieved that the one thing I purchased Slide Effect for is going to be past deadline before you have an opportunity to help me resolve the issue. I have until the weekend. Worried I spent $99 and it won't work in time.
I await your reply in sue course.
Kindest
Nick
Hi,
In my copy of Office 2010 I have the option to Add/Remove features:

Then choose the following:

If it is not the case, can you tell me the exact path where you installed Office and Powerpoint? Something like "C:\Program Files\Microsoft\Office12\POWERPNT.EXE" then I'll send you a fix.
Hi Alain
I have just purchased the professional version and am unable to import powerpoint presentations into slide effect, and got the following error message:
Unable to import the PowerPoint presentation. Error: The message filter
indicated that the application is busy. (Exception from HRESULT:
0x8001010A (RPC_E_SERVERCALL_RETRYLATER)
I ran the diagnostic programmes provided and obtained the following:
output:
Check CURRENT_USER...
Found nothing
Check LOCAL_MACHINE...
Found something: C:\PROGRA~2\MICROS~1\Office12\POWERPNT.EXE
Check if file exists
Found.
Check version
major: 12
minor: 0
output:
Check CURRENT_USER...
Found nothing
Check LOCAL_MACHINE...
Found something: C:\PROGRA~2\MICROS~1\Office12\POWERPNT.EXE
Check if file exists
Found.
Check version
major: 12
minor: 0
Connect to PPT DLL
Connected to PPT DLL
Presentation Opened
Slide Number: 3
Slide Index: 0
Shape Count: 3
Shape Index: 0
Shape Is Text
Text is:tralala
Slide Index: 1
Shape Count: 3
Shape Index: 0
Shape Is Text
Text is:Title.
Shape Index: 1
Shape Is Text
Text is:Pouet
pouet
Slide Index: 2
Shape Count: 3
Shape Index: 0
Shape Is Text
Text is:zomg
Shape Index: 1
Shape Is Text
Text is:It is not working
Any suggestions on fixing the bug would be welcome.
Hi Tony,
Rapidly looking to the log, I would say a reboot of your computer may fix the problem. But I'll look at this issue more in details on Monday.
Hi Alain
Cheers for the reply. I did try a reboot but it hasn't resolved the issue so any other suggestions would be welcome.
Tony
Do you have Powerpoint opened when this error is displayed?
Does PPT show a message box or something like that?
If PPT is open, please close it and try again. Thanks.
I have tried it importing with PowerPoint both open and closed. I have the following message pop-up from PowerPoint afterwards:
Run-time error ‘2147188160 (80048240)’:
Application (unknown member): Invalid request. There is no active presentation.
That's really strange: all these error messages seems to indicate powerpoint is either busy doing something else or has been closed in the middle of the process...
I am not at the office today, but I will try to craft a small test program for you tomorrow.
Thank you
Hi Alain
I have found a way of importing PowerPoint presentations. I let the first attempt to fail and then delete the error messages in both PowerPoint and slide effects and immediately reload. It seems to load fine then for some reason.
Hey Alain,
Im not sure if you are still active (cross fingers).... But here goes my problem:
I created a script which:
1- opens up a powerpoint file
2- adds a textbox with client informations
3- saves as pdf
Public Function PrintPowerpoint(ByVal klant As Klant, ByVal mainFolder As String) As BooleanDim PdfName As String = klant.Naam + " - " + _File.Name
Dim FullPath As String = mainFolder + "\" + directory + "\" + PdfName
pptPres = ppt.Presentations.Open(_File.FullName, , , MsoTriState.msoFalse)
AddClient(klant)
Try
pptPres.SaveAs(FullPath, PowerPoint.PpSaveAsFileType.ppSaveAsPDF)
Return True
Catch ex As Exception
MsgBox(ex.ToString)
Return False
Finally
pptPres.Close()
ppt.Quit()
End Try
End Function
Private Sub AddClient(ByVal klant As Klant)
pptSlide = pptPres.Slides(1)
pptSlide.Shapes.AddTextbox(1, 290, 108, 165, 100)
pptSlide.Shapes(pptSlide.Shapes.Count).TextFrame.TextRange.Text = klant.Gegevens
End Sub
now on my computer it works like a charm but when i try it on another computer it doesn't.
I get following error:
System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component. at Microsoft.Office.Interop.PowerPoint._Presentation.SaveAs(....) at Bollaert.Business.PowerpointHelper.PrintPowerpoint(Client client, String mainFolder) in.....rule 38
Now to be certain I ran your program a few posts back and both have the same output:
output:
Check CURRENT_USER...
Found nothing
Check LOCAL_MACHINE...
Found something: C:\PROGRA~1\MICROS~2\Office12\POWERPNT.EXE
Check if file exists
Found.
Check version
major: 12
minor: 0
Connect to PPT DLL
Connected to PPT DLL
Presentation Opened
Slide Number: 3
Slide Index: 0
Shape Count: 3
Shape Index: 0
Shape Is Text
Text is:tralala
Slide Index: 1
Shape Count: 3
Shape Index: 0
Shape Is Text
Text is:Title.
Shape Index: 1
Shape Is Text
Text is:Pouet
pouet
Slide Index: 2
Shape Count: 3
Shape Index: 0
Shape Is Text
Text is:zomg
Shape Index: 1
Shape Is Text
Text is:It is not working
So as you can see also on the computer where my program isn't able to pdf, it is able to open it.
weirdly enough I can saveAs pdf manually but not programmaticly.
Hi,
I never used PDF export in Powerpoint, sorry.
One idea: which version of PPT are you using when compiling your program? and which version is used on the other computer?
In my case, I keep an old version of PPT installed on my computer to compile with an old version. If you compile with an old version, the program will run on newer versions of PPT (backward compatibility) but not the other way around (compile with latest version of PPT and run on an older one).
Hope it helps.
Well both are PowerPoint 2007.
I checked the other pc for installed components like Form 2.0 support but unfortunately it is installed :D
else I would know where the problem would be.
I tried everything and am just stuck...
One thing I might suspect is the copy local of the libraries, problem is I'm working in an n-tier project so the libraries aren't copied in my starter project but in the business (domain) project. So can I just copy it to the debug folder of the starter project?
Difficult to answer: I am using c# for my projects and you seem to use VB... and it is not quite the same.
But yes, you have to copy libraries to use PPT in your program. In my case I bundle "Microsoft.Office.Interop.PowerPoint.dll" and "Office.dll" in the same directory than my application.
K weirdly enough, when I open powerpoint before using my program it does work.
So on the other computer it doesnt seem to work when running in the background.
Hi Alain,
I'm having the COM issue with the professional version 1.9.10 and Powerpoint 2010. I've installed VBA and rebooted but still having the issue. Below is the output from your check tool. Could you help?
Thanks in advance.
Regards,
John
output:
Check CURRENT_USER...
Found nothing
Check LOCAL_MACHINE...
Found something: C:\PROGRA~1\MICROS~2\Office14\POWERPNT.EXE
Check if file exists
Found.
Check version
major: 14
minor: 0
Connect to PPT DLL
Connected to PPT DLL
Connect Error
System.InvalidCastException: Unable to cast COM object of type 'Microsoft.Office.Interop.PowerPoint.ApplicationClass' to interface type 'Microsoft.Office.Interop.PowerPoint._Application'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{91493442-5A91-11CF-8700-00AA0060263B}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
at Microsoft.Office.Interop.PowerPoint.ApplicationClass.get_Presentations()
at check_ppt.Form1..ctor()
Unable to cast COM object of type 'Microsoft.Office.Interop.PowerPoint.ApplicationClass' to interface type 'Microsoft.Office.Interop.PowerPoint._Application'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{91493442-5A91-11CF-8700-00AA0060263B}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
at Microsoft.Office.Interop.PowerPoint.ApplicationClass.get_Presentations()
at check_ppt.Form1..ctor()
Hi jonno,
Sorry for the delay.
Some questions:
- Did you upgrade PPT from a previous version?
- If you start PPT before importing/exporting is it working?
- Did this work previously? is it something that happen only with SE 1.9.10?
Thanks for these information: it will help me to figure out where the issue is.
Hi Alain,
Thanks for your reply.
- I didn't upgrade PPT from a previous version
- Starting PPT before importing doesn't help
- I only just recently have a need to import PPT's, after updating to 1.9.10 so I can't say
for sure that it was working previously.
I'm on vista (home edition) SP 1.
Office is installed at: C:\Program Files\Microsoft Office\Office14
Regards,
John
Can you do the following things:
1) Repair your Office installation
- Start menu
- Control panel
- Add Remove programs - Go to the tab Change or remove programs.
- Go to Microsoft Office.
- Click "Repair"
Then check again with Slide Effect
2) Run this tool
If it is still not working, please download and run this modified check tool:
download link: http://www.slide-effect.com/tools/checkPPTex2.zip
And copy/paste the result here.
Hi Alain,
Repairing MS Office did the trick! Thanks for your great support.
Regards,
John