delete word picture with macro?

B

BrianG

I've created a macro which, on save, deletes the data-free pages of a
three page form. The problem is that the top of each page contains our
company logo as a Word picture. When the macro deletes the extra pages,
the Word pictures remain. How can I delete these pictures? Or is there
a better way to handle to logo?

BrianG



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
M

Mick

Brain,

This will delete the pictures, but it also deletes any
other Sharp Objects.

Sub removePics()

For iSheet = 1 To ActiveWorkbook.Sheets.Count
Sheets(iSheet).Visible = True
Sheets(iSheet).Select

i = ActiveSheet.Shapes.Count

For j = 1 To i
ActiveSheet.Shapes.Item(1).Select
Selection.Delete
Next j
Next iSheet

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top