title: How To Resolve Compatibility Issues between 14 Microsoft Powerpoint Object Library and 15 Microsoft Powerpoint
body: <p>Hello this is a follow up on this ticket: <a href="https://stackoverflow.com/questions/23140346/how-to-resolve-missing-powerpoint-15-object-library-error">How to resolve Missing Powerpoint 15 Object Library Error</a></p>
  
  <p>I developed a macro that exports something from excel to powerpoint in Excel 2010. I ran into issues when I tried to deploy to people with Office 2010. Per the advice of SO I changed the references to late binding to avoid version dependency. It is now possible to open and run the macro on office 2010 but users still see the error message: "Trouble loading DLL". It says missing 15 Powerpoint VBA when I click into the references. If I uncheck this and check 14 it will run, but it seems like someone in 2010 will have to do this each time they run the Macro. Any advice on how to proceed?  I tried to add the following to resolve the issue</p>
  
  <p><strong>1: Code to repair refrences</strong></p>
  
  <pre><code>Sub RemoveMissingReferences()
  Dim Intrefcount As Integer
  
  With ThisWorkbook.VBProject.references
      For Intrefcount = 1 To .Count
          If Left(.Item(Intrefcount).Description, 7) = "Missing" Then
               .Remove .Item(Intrefcount)
          End If
      Next Intrefcount
     End With
  End Sub
  </code></pre>
  
  <hr>
  
  <p><strong>2: Actual macro which exports from excel to PPT</strong></p>
  
  <pre><code>Sub CopyDataToPPTBrandPers()
  Const ppLayouttitleonly = 11
  Const ppPasteEnhancedMetafile = 2
  
  Dim objWorkSheet As Worksheet
  Dim objRange As Range
  Dim objPPT, objslide, objPresentation, shapePPTOne As Object
  Dim intLocation, intHeight, inLayout, intRefCount As Integer
  Dim strRange As String
  Dim boolRefExists As Boolean
  
  Application.ScreenUpdating = False
  
  boolRefExists = False
  With ThisWorkbook.VBProject.references
      For intRefCount = 1 To .Count
          If .Item(intRefCount).Description = _
              "Microsoft PowerPoint 14.0 Object Library" Then
              boolRefExists = True
          End If
      Next intRefCount
  End With
  
  Set objPPT = CreateObject("PowerPoint.Application")
  
  objPPT.Visible = True
  inLayout = 1
  strRange = "p19:y48"  '&lt;- here
  intHeight = 430
  
  Set objPresentation = objPPT.Presentations.Add
  Set objslide = objPresentation.Slides.Add(1, inLayout)
  objslide.Layout = ppLayouttitleonly
  
  With objslide.Shapes.Title
      With .TextFrame.TextRange
          .Text = "Reebok - " &amp; Sheets("Brand Personality").Cells(3, 2)
          .Words.Font.Bold = msoTrue
          .Font.Color = RGB(255, 255, 255)
      End With
      .Fill.Visible = msoTrue
      .Fill.Solid
      .Fill.ForeColor.RGB = RGB(192, 0, 0) '160, 157, 117)
      .Height = 50
  End With
  
  Set objRange = Sheets("Brand Personality").Range(strRange)
  objRange.Copy
  
  Set shapePPTOne = objslide.Shapes.PasteSpecial(DataType:=ppPasteEnhancedMetafile, _
      Link:=msoFalse)
  DoEvents
  
  If boolRefExists = True Then
      shapePPTOne.Left = 100
      shapePPTOne.Top = 100
      shapePPTOne.Height = intHeight    
  Else
      shapePPTOne(1).Left = 220
      shapePPTOne(1).Top = 100
      shapePPTOne(1).Height = intHeight
  End If
  
  Set shapePPTOne = Nothing
  'Set shapePPTTwo = Nothing
  Set objRange = Nothing
  Set objPPT = Nothing
  Set objPresentation = Nothing
  Set objslide = Nothing
  
  Application.CutCopyMode = False
  Application.ScreenUpdating = True
  MsgBox "Update Complete"
  
  End Sub
  </code></pre>