Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Need to delete autoshapes
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! |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Need to delete autoshapes
On Tue, 15 Dec 2009 13:34:02 -0800, Hans
wrote: 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...) -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Need to delete autoshapes
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. "Hans" wrote in message ... 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! |
#4
|
|||
|
|||
Thanks for the code! It works well, but for some reason it fails to delete Autoshapes placed inside Drawing Canvas. Could you help with that?
|
#5
|
|||
|
|||
Quote:
Never mind! Here's the code: Code:
Dim oShp As Shape Dim oFrm As InlineShape 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 Else If oShp.Type = msoCanvas Then For i = oShp.CanvasItems.Count To 1 Step -1 If oShp.CanvasItems(i).Type = msoAutoShape Then oShp.CanvasItems(i).Delete End If Next i End If End If MsgBox ("Job's done!") Next nCount |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Autoshapes and text | Microsoft Word Help | |||
autoshapes and layouts. | Microsoft Word Help | |||
watermarks and Autoshapes | Microsoft Word Help | |||
How do I move autoshapes | Microsoft Word Help | |||
Autoshapes in Table question | New Users |