-
VBA code when click on PowerPoint last slide then open Word document
Hi,
I am a trainer and have about 100 training modules in Powerpoint 2016.
I also have a Word page in which every presentation is listed. The idea is that I click on a link in Word that will open the Powerpoint presentation. No problems so far, this all works.
However, what I want to achieve is the following:
When I come to the last slide of the pptm presentation and I click the mouse or clicker then this action should close the Powerpoint presentation and open up the Word document that contains the index of the presentations.
I do not want to create an object on the last page that physically needs to be clicked. No, just when I progress to the last page and I click the mouse (Or clicker) then the action will need to happen.
So far I created this code but it doesn't work. Most likely due to the fact that I'm not familiar with the nomenclature in Powerpoint objects.
Sub ReturnToMenu()
Dim sld As Slide
Set sld = Application.ActiveWindow.View.Slide
'With sld = Application.ActiveWindow.View.Slide _
.ActionSettings(ppMouseClick)
With sld.ActionSettings(ppMouseClick)
.Action = ppActionHyperlink
.Hyperlink.Address = "G:\- Course modules\Modules list.docx"
End With
End Sub
Can somebody help please?
Thank you very much in advance!
Cheers,
Luke
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules