Excel Macro open Powerpoint slideshow and go to slide

odonnell

New Member
Joined
Mar 11, 2015
Messages
12
I am struggling to build a macro that will open a Powerpoint file and go to a selected slide.
Below is the code I have but it will only open the powerpoint file, im stuck on getting it to open and go to the slide I choose eg 7

Any help would be great
thanks

Sub Open_PowerPoint_Presentation()
'Opens a PowerPoint Document from Excel
Dim objPPT As Object



Set objPPT = CreateObject("PowerPoint.Application")
objPPT.Visible = True

objPPT.Presentations.Open "C:\test.ppt"
ActivePresentation.View.GotoSlide 7



End Sub
 
Try...

Code:
objPPT.ActiveWindow.View.GotoSlide 7

Hope this helps!
 
Upvote 0
This is what I was looking for, worked perfectly. Thank you so much for your reply Domenic
 
Last edited:
Upvote 0

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top