Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

delete slide from powerpoint from excel VBA 1

Status
Not open for further replies.

chilly442

Technical User
Jun 25, 2008
151
US
After charts are copied into a PP pres, I need to go in and delete slide # 2.

Here is the code that I am trying to use:

Dim pptApp As PowerPoint.Application
Dim pptPres As Object
Dim pptSlide As PowerPoint.Slide
Dim pptShape As PowerPoint.Shape
Dim i As Integer

Set pptSlide = pptPres.Slide.Delete(2)

Not sure what I need to change to get this to run.

Thanks for the help guys.
Chilly442
 
You have to instantiate the objects with the Set instruction and then call the Delete method.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
How does that differ from what I have here:
Set pptSlide = pptPres.Slide.Delete(2)
I'm lost?

What do I need to change to get this to run?

Thanks for the help!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top