![]() |
#1
|
|||
|
|||
![]()
To find the colors used in a document I use createfromdocument function, to place all the colors in a palette. But if all the objects in the document are inside a powerclip, the palette is empty, as if I have no colors. Is there a way to fix that?
|
#2
|
||||
|
||||
![]()
I have only tested this in X4, but it seems to work. Basically I copy all the shapes in the powerclip to another layer, create the palette, then delete the layer.
Code:
Sub CreatePalette() Dim s As Shape Dim sr As New ShapeRange Dim lr As Layer Dim pal As Palette Set lr = ActivePage.CreateLayer("PowerClip") For Each s In ActivePage.Shapes If Not s.PowerClip Is Nothing Then s.PowerClip.Shapes.FindShapes.CopyToLayer lr End If Next s Set pal = Palettes.CreateFromDocument("Document Colors", _ Application.UserDataPath & "Palettes\DocColors.cpl", True) lr.Delete End Sub -Shelby |
#3
|
|||
|
|||
![]()
I did it by adding ALL the shapes on the page to a selection (iterating through the shapes inside the powerclip as well) and then calling a Palettes.CreateFromSelection command. But you'd have to do that for each page. I may be a little faster than copying everything out to a layer, though.
|
#4
|
|||
|
|||
![]()
Thank you both for your help
|
#5
|
|||
|
|||
![]()
have doubt ..
as I could do to carry a 'frame' colors q were created within the document ....... here are some picture ![]() salud.. |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
populate combobox with palette color | bprice | CorelDRAW/Corel DESIGNER VBA | 2 | 23-07-2008 06:47 |
CMYK color Palette in CORELDRAW X3 | whitechapel | General | 2 | 20-04-2007 03:29 |
Color palette in CorelDraw 12 | CorelUser | General | 1 | 02-10-2005 15:51 |
How to set palette as default palette with VBA ? | hmalme | CorelDRAW/Corel DESIGNER VBA | 1 | 22-12-2004 14:26 |
Finding Color Currently Selected in RGB or CMYK Palette | AARRGGHHH | CorelDRAW/Corel DESIGNER VBA | 1 | 30-03-2004 10:03 |