Unable to import PowerPoint presentation

Home Forums Bug Report Unable to import PowerPoint presentation

Viewing 15 posts - 1 through 15 (of 49 total)
  • Author
    Posts
  • #9239
    Start4Life
    Member

    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?

    #9240
    alain
    Keymaster

    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.

    #9241
    Start4Life
    Member

    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?

    #9242
    alain
    Keymaster

    Please download the following file:

    https://www.slide-effect.com/tmp/check_ppt.exe

    Then run it and send me back the text output.

    #9243
    Start4Life
    Member

    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

    #9244
    alain
    Keymaster

    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).

    #9245
    Start4Life
    Member

    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

    #9246
    alain
    Keymaster

    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: https://www.slide-effect.com/tools/checkPPTex.zip

    #9247
    Start4Life
    Member

    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

    #9248
    alain
    Keymaster

    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.

    #9249
    Start4Life
    Member

    Hi Alain,
    that was it. Problem solved. Thanks so much.

    #9250
    alain
    Keymaster

    Good to hear! thanks for your patience.

    #9251
    superlee1117
    Member

    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.

    #9252
    alain
    Keymaster

    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.

    #9253
    superlee1117
    Member

    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?

Viewing 15 posts - 1 through 15 (of 49 total)
  • The forum ‘Bug Report’ is closed to new topics and replies.