Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails
Sub delPPTShapesActiveSlide() 'You can use early binding types, rather than object, on the below variables, by adding the Microsoft Powerpoint X.X Reference Library Dim oPPTApp As Object 'early binding use: PowerPoint.Application Dim oPPTFile As Object 'early binding use: PowerPoint.Presentation Dim oPPTSlide As Object 'early binding use: PowerPoint.Slide Dim oPPTShape As Object 'early binding use: PowerPoint.Shape Dim oPPTShapeArray() As Object 'early binding use: PowerPoint.Shape Dim i As Long On Error GoTo errHandler Set oPPTApp = GetObject(, "Powerpoint.Application") 'reference active powerpoint ' Reference active presentation Set oPPTFile = oPPTApp.ActivePresentation 'reference active presentation oPPTApp.ActiveWindow.ViewType = 1 'early binding use: ppViewSlide 'ensure in slide view mode, for modification Set oPPTSlide = oPPTApp.ActiveWindow.View.Slide 'gets the active slide 'enumerate shapes into array For Each oPPTShape In oPPTSlide.Shapes ReDim Preserve oPPTShapeArray(i) As Object 'early binding use PowerPoint.Shape Set oPPTShapeArray(i) = oPPTShape i = i + 1 Next oPPTShape 'then delete them, backwards to forwards, as there would be problems, deleting them serially For i = UBound(oPPTShapeArray) To LBound(oPPTShapeArray) Step -1 oPPTShapeArray(i).Delete Next i Set oPPTApp = Nothing Set oPPTFile = Nothing Set oPPTShape = Nothing Exit Sub
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
12 Experts available now in Live!