View Single Post
 
Old 12-05-2023, 03:17 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,187
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

ImageRemover has no code in it so I'm not surprised nothing happens with that macro.

The other macro is testing each floating shape to see what it's type is and only deleting them if they are an msoPicture. Apparently the shapes you want to get rid of are not msoPicture types so maybe you don't want to restrict the macro to only msoPicture.
You could ask the macro to tell you what types of shapes are in the document by changing this line
Code:
If oShape.Type = msoPicture Then oShape.Delete
to
Code:
If oShape.Type = msoPicture Then
 oShape.Delete
Else
  Debug.Print oShape.Type
End If
The result will be a series of numbers in your Immediate Window. Those numbers will show you the id of the Shape types that are NOT being deleted.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote