+ Reply to Thread
Results 1 to 15 of 15

Opening PPT from Excel VBA- Office 2003 and 2010 Installed

  1. #1
    Registered User
    Join Date
    06-14-2011
    Location
    Denver, Colorado
    MS-Off Ver
    Excel 2003
    Posts
    81

    Opening PPT from Excel VBA- Office 2003 and 2010 Installed

    Hello,

    I have both Office 2003 and Office 2010 installed on my Windows Vista System as different features are needed from each.

    The problem is that my macro in Excel 2010 opens PowerPoint 2003 and I can't figure out a way to get it to open PowerPoint 2010.

    I'm using this code:
    Code:
    Please Login or Register  to view this content.
    I have added the reference: Microsoft PowerPoint 14.0 Object Library.

    Thank you in advance.

    ML
    Last edited by mlexcelhelpforum; 06-16-2011 at 09:01 AM.

  2. #2
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Opening PPT from Excel VBA- Office 2003 and 2010 Installed

    Try
    Please Login or Register  to view this content.
    or

    Please Login or Register  to view this content.
    Or you can move the reference to the top of the list of references.
    Last edited by snb; 06-16-2011 at 05:35 AM.



  3. #3
    Registered User
    Join Date
    06-14-2011
    Location
    Denver, Colorado
    MS-Off Ver
    Excel 2003
    Posts
    81

    Re: Opening PPT from Excel VBA- Office 2003 and 2010 Installed

    Dear snb,

    Thanks for your response.

    I tried both codes, but both still opened an Office 2003 PowerPoint presentation rather than an Office 2010 PowerPoint presentation.

    I don't know if it helps to show more of the code:

    Please Login or Register  to view this content.
    Of course the code fails when it gets to the part where it must open the specific file, because it has launched the PowerPoint 2003 application and cannot open a .pptx file.

    I'm wondering if the problem could somehow be because I have the click-to-run version of Office 2010 installed?

    ML

  4. #4
    Registered User
    Join Date
    06-14-2011
    Location
    Denver, Colorado
    MS-Off Ver
    Excel 2003
    Posts
    81

    Re: Opening PPT from Excel VBA- Office 2003 and 2010 Installed

    I also tried moving the reference up as far as it would go on the list, but PowerPoint 2003 was still opened instead of 2010.

    Another new clue:

    If I open PowerPoint 2010 before running the macro, the macro works. So when PowerPoint 2010 is not open, it defaults to opening 2003. Any idea what to do there?

  5. #5
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Opening PPT from Excel VBA- Office 2003 and 2010 Installed

    What happens if you use:

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    06-14-2011
    Location
    Denver, Colorado
    MS-Off Ver
    Excel 2003
    Posts
    81

    Re: Opening PPT from Excel VBA- Office 2003 and 2010 Installed

    If I do that, again PowerPoint 2003 tries to open the file, but a message box says:

    This file was created by a newer version of Microsoft PowerPoint. Do you want to download a compatibility pack so that you can work with this file.

  7. #7
    Forum Expert Colin Legg's Avatar
    Join Date
    03-30-2008
    Location
    UK
    MS-Off Ver
    365
    Posts
    1,256

    Re: Opening PPT from Excel VBA- Office 2003 and 2010 Installed

    Hi,

    You can download the MS Office compatability pack which will allow you to open 2007/2010 files in earlier verions.

    As far as automating Powerpoint goes, CreateObject() etc will open the most recently installed version of Powerpoint. However, the click-to-run office operates in a virtual environment and the results of a quick online search suggested that it does not support automation. The suggested workaround is to convert to an MSI installation.
    Hope that helps,

    Colin

    RAD Excel Blog

  8. #8
    Registered User
    Join Date
    06-14-2011
    Location
    Denver, Colorado
    MS-Off Ver
    Excel 2003
    Posts
    81

    Re: Opening PPT from Excel VBA- Office 2003 and 2010 Installed

    Thanks, Colin.

    I'm not interested in downloading a compatibility pack to open my 2010 .pptx file with PowerPoint 2003. As I have PowerPoint 2010 installed on my machine, I'd like to open the presentation with 2010.

    For now I'm going to use my workaround which is to first open PowerPoint 2010 before running the macro, and as soon as I get the code to work , I'll see about switching to the MSI installation.

    In the MSI installation is the program installed under C instead of a virtual drive?

    Thanks to both of you for your tips.

    ML

  9. #9
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Opening PPT from Excel VBA- Office 2003 and 2010 Installed

    I think it has to do with the map options: the link that is laid between a file extension and the program that has to be activated when opening such a file.

  10. #10
    Registered User
    Join Date
    06-14-2011
    Location
    Denver, Colorado
    MS-Off Ver
    Excel 2003
    Posts
    81

    Re: Opening PPT from Excel VBA- Office 2003 and 2010 Installed

    If I double click a PowerPoint 2010 file on my desktop, PowerPoint 2010 opens it.

    If I double click a PowerPoint 2003 file on my desktop, PowerPoint 2003 opens it.

    It's only when I try to open PowerPoint 2010 from an excel macro that PowerPoint 2003 opens instead of 2010.

    Unfortunately I don't know a thing about map options, yet. Are map options something I could and should edit?

    Thanks,
    ML

  11. #11
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Opening PPT from Excel VBA- Office 2003 and 2010 Installed

    What happens in Excel 2010 when using:

    Please Login or Register  to view this content.

  12. #12
    Registered User
    Join Date
    06-14-2011
    Location
    Denver, Colorado
    MS-Off Ver
    Excel 2003
    Posts
    81

    Re: Opening PPT from Excel VBA- Office 2003 and 2010 Installed

    Snb,

    I just gave it a try. I don't want to speak too soon, but it looks like... that worked!

    Hopefully when I go back and try that again, it doesn't stop working.

    How did you figure that out?!

    AMAZING!

    ML

  13. #13
    Registered User
    Join Date
    06-14-2011
    Location
    Denver, Colorado
    MS-Off Ver
    Excel 2003
    Posts
    81

    Re: Opening PPT from Excel VBA- Office 2003 and 2010 Installed

    How do we mark this as SOLVED?

  14. #14
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Opening PPT from Excel VBA- Office 2003 and 2010 Installed

    Click in the link in my signature to see how it's done.

  15. #15
    Registered User
    Join Date
    06-14-2011
    Location
    Denver, Colorado
    MS-Off Ver
    Excel 2003
    Posts
    81

    Re: Opening PPT from Excel VBA- Office 2003 and 2010 Installed

    Oops, didn't notice that before! Done.

    Thank you very much for your help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1