Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.
Private Sub Form_Load() On Error GoTo insertShow_Click_Error ' Open PowerPoint Dim strPowerPointFile As String Dim pptobj As PowerPoint.Application Set pptobj = New PowerPoint.Application pptobj.Visible = True pptobj.WindowState = ppWindowMinimized strPowerPointFile = "C:\Users\me\desktop\file.pptx" ' Fill a collection with all Slide IDs. With pptobj.Presentations.Open(strPowerPointFile) Set mcolSlideIDs = New Collection Dim ppSlide As PowerPoint.Slide For Each ppSlide In .Slides mcolSlideIDs.Add ppSlide.SlideID Next .Close End With ' Close PowerPoint pptobj.Quit Set pptobj = Nothing ' Make object frame visible and enable "navigation" buttons. pptFrame.Visible = True ' FirstSlide.Enabled = True 'lastSlide.Enabled = True 'nextslide.Enabled = True ' previousSlide.Enabled = True ' Specify OLE Class, Type, SourceDoc, SourceItem and other properties. With pptFrame .Class = "Microsoft Powerpoint Slide" .OLETypeAllowed = acOLELinked .SourceDoc = strPowerPointFile End With SetSlide 1 Exit Sub insertShow_Click_Error: MsgBox Err.Number & " " & Err.Description Exit Sub End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.