Skip to content

Instantly share code, notes, and snippets.

@ateneva
Last active March 18, 2018 13:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ateneva/6f2d35e8895357556432d755d8f0d568 to your computer and use it in GitHub Desktop.
Save ateneva/6f2d35e8895357556432d755d8f0d568 to your computer and use it in GitHub Desktop.
'open existing PowerPoint Application (Excel VBA)
'-------------------------------------------------------------------------------------------------
Dim PPApp As PowerPoint.Application
Dim PPpres As PowerPoint.Presentation
Set PPApp = New PowerPoint.Application 'creates a PP application and makes it visible
PPApp.Visible = True
'Open the presentation you wish to copy to
Set PPpres = PPApp.Presentations.Open("C:\Users\Angelina\Documents\Import-Export Balance.pptm")
'----------------------------------------------------------------------------------------------------
'call PowerPoint application that's already open (Excel VBA)
Dim PPApp As PowerPoint.Application
Set PPApp = GetObject(, "Powerpoint.Application") 'use if you are planning on having your ppt open
Dim PPpres As PowerPoint.Presentation
Set PPpres = PPApp.ActivePresentation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment