![]() |
|
#1
|
|||
|
|||
|
I need to find if a document has white objects with fill set to overprint, so I use this macro:
Sub whiteoverprint() Dim sr As ShapeRange Dim s As Shape Set sr = ActivePage.Shapes.FindShapes() For Each s In sr If s.Fill.UniformColor.IsWhite And s.OverprintFill Then MsgBox "white overprint" End If Next s End Sub But documents are complex, with grouped objects, powerclips, etc. If I have a green shape, with fill set to overprint, and in front of it a white shape, with fill not set to overprint, if the two shapes are grouped, then the macro will say that I have white overprint. Where is the problem? |
|
#2
|
||||
|
||||
|
When you use FindShapes it returns each shape and the groups, so you will want to remove the groups from your shaperange like this. This way you are only working with each shape. If you want the code to dig into powerclips that is going to take a bit more code. If I get a minute today I will see if I can add it for you.
Code:
Sub whiteoverprint()
Dim sr As ShapeRange
Dim s As Shape
Set sr = ActivePage.Shapes.FindShapes()
sr.RemoveRange sr.FindAnyOfType(cdrGroupShape)
For Each s In sr
If s.Fill.UniformColor.IsWhite And s.OverprintFill Then
MsgBox "white overprint"
End If
Next s
End Sub
-Shelby |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Convert All fills except black to white - how? | knowbodynow | CorelDRAW/Corel DESIGNER VBA | 3 | 08-06-2011 06:32 |
| Fade from white to transparent | DalePurdon | General | 1 | 23-10-2006 06:08 |
| Color to Black & White | Mark | CorelDRAW/Corel DESIGNER VBA | 3 | 20-07-2004 14:57 |
| Color Replecer - not replece white color | Zuk | Macros/Add-ons | 2 | 30-04-2003 01:44 |