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
Bookmarks