An unusual question but I am hoping the experts here can help out.
I have an Excel workbook that models an cost allocation process. There is also a PowerPoint presentation that explains this process. I want, in various worksheets of the workbook, place a command button that will open the PowerPoint in presentation mode. I can set the slides for time. After the PowerPoint slideshow is over, I want to exit PowerPoint and return to Excel.
I have written VBA code that will successfully open the PowerPoint. However, I cannot figure out if it is possible to open in slideshow view, rather than sorter view. Also, I do not know how to allow the PowerPoint to run and close, then return to Excel.
My code at present is:
Sub Open_PowerPoint()
'Opens a PowerPoint presentation from Excel
Dim objPPT As Object, s$
Dim myPresentation As PowerPoint.Presentation
s = "D:\Dropbox\Jobs\NCDOT Financial Technical Assistance\Presentation1.pptx"
Set objPPT = CreateObject("PowerPoint.Application")
objPPT.Visible = True
Select Case Dir(s) <> ""
Case True
objPPT.Presentations.Open s
Case False
MsgBox "Could not find file!", vbCritical, s
End Select
End Sub
Any help will be appreciated.
Bookmarks