Results 1 to 3 of 3

Need 2013 Binding that works for 2010

Threaded View

  1. #1
    Registered User
    Join Date
    10-23-2009
    Location
    USA
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    75

    Need 2013 Binding that works for 2010

    Hello,

    I created a 2010 app that created a PowerPoint after complete of the area of Excel needed. The problem is a user opened it up on his computer in 2013 and saved so the Microsoft PowerPoint 14.0 Object Library auto updated to 15.0 so when decided to run in 2010 it failed now..


    Sub MakeSlides1()
    'Dim password As Variant
    'password = Application.InputBox("Enter Password", "Password Protected")
    'Select Case password
    '    Case Is = False
    '        'do nothing
     '   Case Is = "PTACCESS"
    '        Range("A1").Value = "This is secret code"
    '    Case Else
    '        MsgBox "Incorrect Password"
    'End Select
        Dim mydata As Excel.Range
        Dim Sheet1 As Excel.Worksheet
        Dim Output As Workbook
        Dim WorkbookName As String
        Dim WorksheetName As String
        Dim PowerPointName As String
        Set Sheet1 = ActiveWorkbook.Sheets("PT DECK")
        'Set mydata = sheet1.Range("A35:S69")
        'mydata.Copy
        'Range("A35:R69").CopyPicture
        Dim pptApp As New PowerPoint.Application
        pptApp.Visible = True
        pptApp.Activate
        Dim pptPres As PowerPoint.Presentation
        Set pptPres = pptApp.Presentations.Add
        Sheets("PT DECK").Select
    'SLIDE 1
        Dim pptSlide As PowerPoint.Slide
        Set pptSlide = pptPres.Slides.Add(1, PowerPoint.PpSlideLayout.ppLayoutBlank)
        pptSlide.Select
        Range("B35:T69").CopyPicture 'Excel Cells not really a picture..
        pptSlide.Shapes.Paste.Select
        'Adjusting the Top and Bottom, trying to fix it on the paper
        pptApp.ActiveWindow.Selection.ShapeRange.Top = 45
        pptApp.ActiveWindow.Selection.ShapeRange.Height = 540
        pptApp.ActiveWindow.Selection.ShapeRange.Align msoAlignCenters, True
        pptApp.ActiveWindow.Selection.ShapeRange.Align msoAlignMiddles, True
        Application.ScreenUpdating = True
    
    'ETC some saving code
    
    End Sub
    I'm reading and they saying to do Object something like this below, maybe some knows how.
    So like to delete the Object library and do it in all code..

        'Dim pptApp As Object
        'Set pptApp = CreateObject("PowerPoint.Application")
        'pptApp.Visible = True
        'pptApp.Activate
        
        'Dim pptPres As Object
        'Set pptPres = CreateObject("PowerPoint.Presentation")
        
        'Dim pptSlide As Object
        'Set pptPres = CreateObject("PowerPoint.Slide")
    MBCMDR
    Last edited by MBCMDR; 09-02-2015 at 01:05 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Macro button works for 2010 users, but not 2013
    By jspatten in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-18-2015, 03:11 PM
  2. Replies: 0
    Last Post: 06-08-2015, 03:07 PM
  3. Code works for outlook 2010 but not 2013
    By Legend Rubber in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-13-2015, 05:00 PM
  4. Excel 4.0 macro works in 2010 but is broken in 2013
    By gregsedwards in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-04-2014, 05:48 PM
  5. Excel 2007 works but not 2010 or 2013
    By Miliano in forum Excel General
    Replies: 1
    Last Post: 10-02-2014, 03:20 AM
  6. [SOLVED] Macro works in 2010&2013 but not Excel 2003
    By Mattiac in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-06-2014, 03:12 AM
  7. Late Binding VBA Issue from 2013 PPT to 2010
    By cgermanjr in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-30-2013, 02:23 PM

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