Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-05-2013, 12:04 PM
daviddws daviddws is offline Tasked with deleting slidesets in powerpoint using macro Windows 7 64bit Tasked with deleting slidesets in powerpoint using macro Office 2007
Novice
Tasked with deleting slidesets in powerpoint using macro
 
Join Date: Apr 2013
Posts: 1
daviddws is on a distinguished road
Default Tasked with deleting slidesets in powerpoint using macro

Ok, first off I am very new to this. I have been tasked with deleting slidesets from a powerpoint presentation using a macro. I am familiar with using this:



ActivePresentation.Slides(2).Delete

however I am looking to delete a range of slides, starting with slide 2.

Any help is greatly appreciated.



David
Reply With Quote
  #2  
Old 04-05-2013, 11:48 PM
JohnWilson JohnWilson is offline Tasked with deleting slidesets in powerpoint using macro Windows 7 64bit Tasked with deleting slidesets in powerpoint using macro Office 2010 32bit
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,913
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

You can delete the selected slides

ActiveWindow.Selection.SlideRange.Delete

However it would be quicker just to pressthe DELETE key so I guess this isn;t what you need!

To delete a range of slides you can use

ActivePresentation.Slides.Range(Array(2, 3, 5)).Delete

If the slides to delete are contiguous

Dim i As Integer
'to delete say 3 to 10
For i = 10 To 3 Step -1'always loop backwards when deleting
ActivePresentation.Slides(i).Delete
Next i
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials

Last edited by JohnWilson; 04-06-2013 at 06:56 AM.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Tasked with deleting slidesets in powerpoint using macro Saving as ( PowerPoint Macro-Enabled Slide Show )?? delete123 PowerPoint 2 04-10-2013 05:38 AM
Deleting Macro Button mata30s Word VBA 0 01-23-2013 12:04 PM
Tasked with deleting slidesets in powerpoint using macro Macro to link to another powerpoint presentation slothman2000 PowerPoint 15 09-22-2012 04:42 AM
Tasked with deleting slidesets in powerpoint using macro Deleting Duplicates in Macro jillapass Excel Programming 1 01-11-2012 10:02 AM
Powerpoint Macro To Insert Objects Sample lahuva PowerPoint 0 07-06-2011 10:51 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:02 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft