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
 

Some videos you may like

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

Greg Truby

MrExcel MVP
Joined
Jun 19, 2002
Messages
10,014
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,014
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).
 

Watch MrExcel Video

Forum statistics

Threads
1,111,596
Messages
5,541,154
Members
410,543
Latest member
ExcelGlenn
Top