OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Corel User Forums > CorelDRAW > Macros/Add-ons

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 21-11-2008, 02:34
robert
Guest
 
Posts: n/a
Default white overprint

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?
Reply With Quote
  #2  
Old 21-11-2008, 13:00
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,711
Blog Entries: 6
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default FindShapes

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
Best of luck,

-Shelby
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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


All times are GMT -5. The time now is 21:59.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com