0
votes

I have a powerpoint presentation embedded in Excel which I am opening using a macro and then I would like to save the open presentation to the C Drive

I tried the below code but unable to save the powerpoint to the required destination.

Sub openppt()

Dim ppPres  As PowerPoint.Presentation
Set ppApp = New PowerPoint.Application
Todate = Date
Sheets("SupportData").Select
ActiveSheet.Shapes.Range(Array("Object 7")).Select
Selection.Verb Verb:=3
activeSlide.SaveAs "C:\Release_Review\" & "Release_Review" & Todate & 
".pptx"
End Sub

I would like the open slide to be saved in C:\Release_Review\ and then name should be Release_ReviewTodays_date

1
Please describe exactly how the code you have isn't working. Are you getting an error message? - Cindy Meister

1 Answers

0
votes

First, you can refer to your object using the OLEObject object. Secondly, 3 does not appear to be a valid verb. Try the following instead...

Sub openppt()

    Dim oleObj As OLEObject
    Set oleObj = Worksheets("SupportData").OLEObjects("Object 7")

    oleObj.Verb xlVerbOpen

    Dim pres As Object
    Set pres = oleObj.Object

    pres.SaveAs "C:\Release_Review\Release_Review" & Date & ".pptx"

End Sub