Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / June 2007

Tip: Looking for answers? Try searching our database.

Bulk image deletion in Excel 2003

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Anika V. Bristalli - 08 Jun 2007 18:02 GMT
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!
Ron de Bruin - 08 Jun 2007 18:10 GMT
See this page Anika
http://www.rondebruin.nl/controlsobjectsworksheet.htm

Signature

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm

> Hi,
>
[quoted text clipped - 14 lines]
> Any suggestions, inlcuding macro/vba code would be appreciated.
> Thank you!
Anika V. Bristalli - 08 Jun 2007 18:35 GMT
Sweet! This is exactly it! Thank you very much!

> See this page Anikahttp://www.rondebruin.nl/controlsobjectsworksheet.htm
>
[quoted text clipped - 22 lines]
>
> - Show quoted text -
Dennis Saunders - 09 Jun 2007 07:51 GMT
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
Ron de Bruin - 09 Jun 2007 17:54 GMT
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

Signature

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm

> Thanks Ron,
> I had a variation of "Notusethis Macro" which slowed the macro down and had
[quoted text clipped - 17 lines]
>
> End Sub

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.