Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Deleting Pictures to reduce workbook size

I have 16 almost identical workbooks about 8MB each.
A few offending workbooks are 11MB to 13MB.
I suspect that these larger file sizes are caused by numerous unwanted
"Pictures".
I need a way to delete them easily & quickly versus recreating the offending
workbook by using an 8MB file as the starting point.

The history:
Workbook 01 is a model that requires my copying an "area" from a page on our
supplier's website and pasting this "area" into a worksheet - the pasted area
takes up 9 columns by 34 rows and contains text, numbers, and pictures.
There are ten such worksheets, and, thus, ten such pastings per workbook.
Workbook 02 was created by taking Workbook 01 and clearing the 9C x 34R
areas to ready for new pastings. Unfortunately, this won't remove the
pictures.
By the time one gets to Workbook 16 there are many accumulated pictures.

The problem:
How to delete these pictures without highly repetitive clicking on the
picture and pressing the delete button. The Name Box next to the Formula Bar
shows "Picture 12000" and other equally large numbers, so, somehow, I've
accumulated a lot of pictures.

Thank you.
Stephen Powell
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Deleting Pictures to reduce workbook size

Hi Stephen:

This little sub will remove all pictures on all worksheets in a workbook:


Sub pic_puller()
Dim w As Worksheet
For Each w In ActiveWorkbook.Worksheets
w.Activate
pCount = w.Shapes.Count
If pCount 0 Then
For i = pCount To 1 Step -1
w.Shapes(i).Select
Selection.Cut
Next
End If
Next
End Sub
--
Gary's Student


"Stephen POWELL" wrote:

I have 16 almost identical workbooks about 8MB each.
A few offending workbooks are 11MB to 13MB.
I suspect that these larger file sizes are caused by numerous unwanted
"Pictures".
I need a way to delete them easily & quickly versus recreating the offending
workbook by using an 8MB file as the starting point.

The history:
Workbook 01 is a model that requires my copying an "area" from a page on our
supplier's website and pasting this "area" into a worksheet - the pasted area
takes up 9 columns by 34 rows and contains text, numbers, and pictures.
There are ten such worksheets, and, thus, ten such pastings per workbook.
Workbook 02 was created by taking Workbook 01 and clearing the 9C x 34R
areas to ready for new pastings. Unfortunately, this won't remove the
pictures.
By the time one gets to Workbook 16 there are many accumulated pictures.

The problem:
How to delete these pictures without highly repetitive clicking on the
picture and pressing the delete button. The Name Box next to the Formula Bar
shows "Picture 12000" and other equally large numbers, so, somehow, I've
accumulated a lot of pictures.

Thank you.
Stephen Powell

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Deleting Pictures to reduce workbook size

Gary:
I'm a macro dummy but I know whom to ask in our office.
Your reply put me on the right track.
With a few modifications for my particular application your suggestion was
the perfect start.
Thank you very much.
FYI here is what we ending up with:
Sub pic_puller()
Dim w As Worksheet
For Each w In ActiveWorkbook.Worksheets
If Len(w.Name) < 6 And w.Name < "Unit#" Then
w.Activate
pCount = w.Shapes.Count
If pCount 0 Then
For i = pCount To 1 Step -1
w.Shapes(i).Select
Selection.Cut
Next
End If
End If
Next
End Sub


"Gary''s Student" wrote:

Hi Stephen:
This little sub will remove all pictures on all worksheets in a workbook:
Sub pic_puller()
Dim w As Worksheet
For Each w In ActiveWorkbook.Worksheets
w.Activate
pCount = w.Shapes.Count
If pCount 0 Then
For i = pCount To 1 Step -1
w.Shapes(i).Select
Selection.Cut
Next
End If
Next
End Sub
--
Gary's Student


"Stephen POWELL" wrote:
I have 16 almost identical workbooks about 8MB each.
A few offending workbooks are 11MB to 13MB.
I suspect that these larger file sizes are caused by numerous unwanted
"Pictures".
I need a way to delete them easily & quickly versus recreating the offending
workbook by using an 8MB file as the starting point.
The history:
Workbook 01 is a model that requires my copying an "area" from a page on our
supplier's website and pasting this "area" into a worksheet - the pasted area
takes up 9 columns by 34 rows and contains text, numbers, and pictures.
There are ten such worksheets, and, thus, ten such pastings per workbook.
Workbook 02 was created by taking Workbook 01 and clearing the 9C x 34R
areas to ready for new pastings. Unfortunately, this won't remove the
pictures.
By the time one gets to Workbook 16 there are many accumulated pictures.
The problem:
How to delete these pictures without highly repetitive clicking on the
picture and pressing the delete button. The Name Box next to the Formula Bar
shows "Picture 12000" and other equally large numbers, so, somehow, I've
accumulated a lot of pictures.
Thank you.
Stephen Powell
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Deleting Pictures to reduce workbook size

To delete all shapes
one sheet
For Each S In ActiveSheet.Shapes
S.Cut
Next

all sheets
for each ws in thisworkbook.worksheets
For Each S In ws.Shapes
S.Cut
next s
next ws

--
Don Guillett
SalesAid Software

"Stephen POWELL" wrote in message
...
I have 16 almost identical workbooks about 8MB each.
A few offending workbooks are 11MB to 13MB.
I suspect that these larger file sizes are caused by numerous unwanted
"Pictures".
I need a way to delete them easily & quickly versus recreating the
offending
workbook by using an 8MB file as the starting point.

The history:
Workbook 01 is a model that requires my copying an "area" from a page on
our
supplier's website and pasting this "area" into a worksheet - the pasted
area
takes up 9 columns by 34 rows and contains text, numbers, and pictures.
There are ten such worksheets, and, thus, ten such pastings per workbook.
Workbook 02 was created by taking Workbook 01 and clearing the 9C x 34R
areas to ready for new pastings. Unfortunately, this won't remove the
pictures.
By the time one gets to Workbook 16 there are many accumulated pictures.

The problem:
How to delete these pictures without highly repetitive clicking on the
picture and pressing the delete button. The Name Box next to the Formula
Bar
shows "Picture 12000" and other equally large numbers, so, somehow, I've
accumulated a lot of pictures.

Thank you.
Stephen Powell



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Deleting Pictures to reduce workbook size

You are very welcome.
--
Gary's Student


"Stephen POWELL" wrote:

Gary:
I'm a macro dummy but I know whom to ask in our office.
Your reply put me on the right track.
With a few modifications for my particular application your suggestion was
the perfect start.
Thank you very much.
FYI here is what we ending up with:
Sub pic_puller()
Dim w As Worksheet
For Each w In ActiveWorkbook.Worksheets
If Len(w.Name) < 6 And w.Name < "Unit#" Then
w.Activate
pCount = w.Shapes.Count
If pCount 0 Then
For i = pCount To 1 Step -1
w.Shapes(i).Select
Selection.Cut
Next
End If
End If
Next
End Sub


"Gary''s Student" wrote:

Hi Stephen:
This little sub will remove all pictures on all worksheets in a workbook:
Sub pic_puller()
Dim w As Worksheet
For Each w In ActiveWorkbook.Worksheets
w.Activate
pCount = w.Shapes.Count
If pCount 0 Then
For i = pCount To 1 Step -1
w.Shapes(i).Select
Selection.Cut
Next
End If
Next
End Sub
--
Gary's Student


"Stephen POWELL" wrote:
I have 16 almost identical workbooks about 8MB each.
A few offending workbooks are 11MB to 13MB.
I suspect that these larger file sizes are caused by numerous unwanted
"Pictures".
I need a way to delete them easily & quickly versus recreating the offending
workbook by using an 8MB file as the starting point.
The history:
Workbook 01 is a model that requires my copying an "area" from a page on our
supplier's website and pasting this "area" into a worksheet - the pasted area
takes up 9 columns by 34 rows and contains text, numbers, and pictures.
There are ten such worksheets, and, thus, ten such pastings per workbook.
Workbook 02 was created by taking Workbook 01 and clearing the 9C x 34R
areas to ready for new pastings. Unfortunately, this won't remove the
pictures.
By the time one gets to Workbook 16 there are many accumulated pictures.
The problem:
How to delete these pictures without highly repetitive clicking on the
picture and pressing the delete button. The Name Box next to the Formula Bar
shows "Picture 12000" and other equally large numbers, so, somehow, I've
accumulated a lot of pictures.
Thank you.
Stephen Powell

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
One workbook to another . . . Wayne Knazek Excel Discussion (Misc queries) 2 September 26th 06 08:49 PM
How can I prevent someone from deleting a shared workbook? Brian Excel Worksheet Functions 2 May 19th 06 02:49 PM
workbook size and calculations Hugh Excel Worksheet Functions 1 March 11th 05 02:05 PM
How do I reduce the size of an exel file? eselgar Excel Discussion (Misc queries) 4 February 4th 05 05:44 PM
I can't adjust the window size of an active workbook. Julie Excel Discussion (Misc queries) 1 January 26th 05 05:19 PM


All times are GMT +1. The time now is 02:29 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"