ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   delete word picture with macro? (https://www.excelbanter.com/excel-programming/277788-delete-word-picture-macro.html)

BrianG[_4_]

delete word picture with macro?
 
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!

Mick[_4_]

delete word picture with macro?
 
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

-----Original Message-----
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!
.



All times are GMT +1. The time now is 11:41 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com