Automatically Run PowerPoint Presentation in Excel?

TPD

Board Regular
Joined
Dec 10, 2003
Messages
54
Hi,

I have inserted (embedded) a PowerPoint presentation via the insert>Object>from file menu and all is well with the world. The Thumbnail presides in the workbook and looks great.

Is there a way to either:
A) Have it so that the minute a person opens the workbook, the presentation begins playing fullscreen? What code would I use for that and where would I enter it?

B) OR.... is there a way so that it can be viewed while still in Excel and NOT fullscreen but rather restricted to the thumbnail size that I size it to in the workbook? (this option can be triggered by button or click).

Thanks,
TD
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.

Greg Truby

MrExcel MVP
Joined
Jun 19, 2002
Messages
10,019
For (a) use the primary verb. For (b) you can use the secondary verb to put the object into edit mode. The user can then use PageUp and PageDown to move through the presentation.
Code:
Sub ShowPPT()
    ActiveSheet.Shapes("PPT1").Select
    Selection.Verb Verb:=xlPrimary
End Sub

Sub EditPPT()
    ActiveSheet.Shapes("PPT1").Select
    Selection.Verb Verb:=xlSecondary
End Sub
 

TPD

Board Regular
Joined
Dec 10, 2003
Messages
54
Hmmm,..I did this and it didn't work.

I right clicked on the presentation object
Went to "Assign Macro"

It showed Object1_Click as the default Macro

I chose New (as Edit was not an option)

It opens up the module that looks like this:
Sub Object1_Click()

End Sub

I deleted it and ....

...and here's what it looked like when I was done.
Sub ShowPPT()
ActiveSheet.Shapes("BAM__capabilities2").Select
Selection.Verb Verb:=xlPrimary
End Sub

I save the workbook and re-open it. The Powerpoint presentation is embedded, but nothing happens. It should run automatically after I open it. For grins,...I clicked on the thumbnail and it says that the Macro cannot be found.
 

Greg Truby

MrExcel MVP
Joined
Jun 19, 2002
Messages
10,019
Sorry, thought you were more familiar with VBA.
  1. Is the embedded ppt presentation's name actually BAM__capabilities2 ? Verify by selecting (clicking on) the presentation object and looking at the name in the Name Box on the left end of the formula bar.
  2. Test ShowPPT by calling it interactively. Assuming that it works then edit the workbook's _Open event handler to call ShowPPT
  3. The EditPPT macro is per your item (b) and assume you would call this from a button's _click event handler (if ActiveX button) or assign to the button (if using a Forms button).
 

Forum statistics

Threads
1,141,740
Messages
5,708,235
Members
421,553
Latest member
Geeyj

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
Top