Need to delete autoshapes

H

Hans

I have a document with 1,000+ Autoshapes. I need to get the Autoshapes out of
the doc because, though they are supposed to be WHITE and therefore NOT
PRINT, they are printing BLACK!! (They are not visible on-screen.)

Is there a way to globally search/replace or search/delete Autoshapes?

They are not in the header/footer. I stupidly used Autoshapes (lines) as
layout guides in a mail merged doc that, now print-ready, is 500 pages long
and which cannot be rebuilt without considerable effort because many of the
merge fields have been converted to images, many of which, in turn, were
manually arranged.

THANK YOU!
 
J

Jay Freedman

I have a document with 1,000+ Autoshapes. I need to get the Autoshapes out of
the doc because, though they are supposed to be WHITE and therefore NOT
PRINT, they are printing BLACK!! (They are not visible on-screen.)

Is there a way to globally search/replace or search/delete Autoshapes?

They are not in the header/footer. I stupidly used Autoshapes (lines) as
layout guides in a mail merged doc that, now print-ready, is 500 pages long
and which cannot be rebuilt without considerable effort because many of the
merge fields have been converted to images, many of which, in turn, were
manually arranged.

THANK YOU!

Use the following macro (see
http://www.gmayor.com/installing_macro.htm if needed):

Sub DeleteAutoShapes()
Dim oShp As Shape
Dim nCount As Long

For nCount = ActiveDocument.Shapes.Count To 1 Step -1
Set oShp = ActiveDocument.Shapes(nCount)
If oShp.Type = msoAutoShape Then
oShp.Delete
End If
Next
End Sub

I'd recommend making a backup copy of the document first (in addition
to the backup that I'm sure you already have...)
 
D

Doug Robbins - Word MVP

Use a macro containing the following code:

Dim i As Long
With ActiveDocument
For i = .Shapes.Count To 1 Step -1
If .Shapes(i).Type = msoAutoShape Then
.Shapes(i).Delete
End If
Next i
End With


--
Hope this helps,

Doug Robbins - Word MVP

Please reply only to the newsgroups unless you wish to obtain my services on
a paid professional basis.
 

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