Bulk image deletion in Excel 2003

  • Thread starter Anika V. Bristalli
  • Start date
A

Anika V. Bristalli

Hi,

Here is my problem: I am trying to dump a bunch of HTML data tables
into Excel spreadsheets. The HTML formatting is important for me, so I
just use "Copy and Paste" function that allows me to preserve HTML
like look of the tables. However, along with the formatting this
function also preserves a bunch of tiny images that are present in the
original HTML file but are not necessary in the Excel file. There are
on average about 16 or them per table, and right now I have to go
through nearly 200 tables and click on each image separately in order
to get rid of them.

So, here is my question: Does Excel 2003 have an automated way to
tackle this issue where I would be able to select all of the "picture"
objects in a spreadsheet and delete them all at once?

Any suggestions, inlcuding macro/vba code would be appreciated.
Thank you!
 
R

Ron de Bruin

Hi Dennis

No need to use
ActiveSheet.OLEObjects.Delete

This code will delete them

Sub Shapes1()
'Delete all Objects except Comments
On Error Resume Next
ActiveSheet.DrawingObjects.Visible = True
ActiveSheet.DrawingObjects.Delete
On Error GoTo 0
End Sub
 
Top