Bulk image deletion in Excel 2003

  • Thread starter Thread starter Anika V. Bristalli
  • Start date 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!
 
Thanks Ron,
I had a variation of "Notusethis Macro" which slowed the macro down and had
deleted the drop downs. A very fine fix indeed....it now looks like:

Sub DelWebstuff()
'
' Macro2 Macro
' Macro recorded 22/02/2003 by Dennis
'

'
ActiveSheet.Hyperlinks.Delete
ActiveSheet.OLEObjects.Delete
ActiveSheet.DrawingObjects.Visible = True
ActiveSheet.DrawingObjects.Delete
'Dim sh As Shape
'For Each sh In ActiveSheet.Shapes
' sh.Delete
'Next

End Sub
 
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
 
Back
Top