View Single Post
 
Old 12-01-2020, 09:02 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,977
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

Your ActiveDocument.Select line is selecting everything so any subsequent code would apply to the whole document. Perhaps you are looking for something along the following lines.
Code:
Sub DeleteShapes()
  Do While Selection.Range.ShapeRange.Count > 0
    Selection.Range.ShapeRange(1).Delete
  Loop
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote