OberonPlace.com Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #11  
Old 01-06-2018, 08:48
mtracy mtracy is offline
Member
 
Join Date: Jun 2012
Location: Niceville, Florida
Posts: 31
Default

works but

Name:  code error.PNG
Views: 2761
Size:  12.9 KB
__________________
Myron Tracy
Accent Signs
Reply With Quote
  #12  
Old 01-06-2018, 08:49
mtracy mtracy is offline
Member
 
Join Date: Jun 2012
Location: Niceville, Florida
Posts: 31
Default

And still has black even though nothing black exists in the doc
__________________
Myron Tracy
Accent Signs
Reply With Quote
  #13  
Old 01-06-2018, 09:03
mtracy mtracy is offline
Member
 
Join Date: Jun 2012
Location: Niceville, Florida
Posts: 31
Default

doc palette explained

Name:  doc palette explained.jpg
Views: 2527
Size:  39.2 KB
__________________
Myron Tracy
Accent Signs
Reply With Quote
  #14  
Old 04-06-2018, 01:52
shark shark is offline
Senior Member
 
Join Date: Aug 2010
Location: Russia, Belgorod
Posts: 146
Default works but

what version of Corel Draw do you have?
Reply With Quote
  #15  
Old 04-06-2018, 08:42
mtracy mtracy is offline
Member
 
Join Date: Jun 2012
Location: Niceville, Florida
Posts: 31
Default

Gettin' there. Still kind of "buggy"

Seems you had to select all shapes first so I added a line after
...Set srAllShapes = ActivePage.Shapes.All
srAllShapes.AddToSelection

Would also need a
If new color found that's not already in the palette then add to palette
So if you did an undo the palette could be upadated

Error when palette is already correct and you run the macro to update. Deletes colors from the palette when it shouldn't do anything.
__________________
Myron Tracy
Accent Signs
Reply With Quote
  #16  
Old 08-06-2018, 15:00
mtracy mtracy is offline
Member
 
Join Date: Jun 2012
Location: Niceville, Florida
Posts: 31
Default

Nope. This one is close but doesn't work if Pantone colors are used.

Sub Reset_DocPalette()

ResetPalette ActiveDocument
End Sub

Sub ResetPalette(ByRef iDoc As Document)

Dim CurColNo As Integer, CurPg As Page, CurSh As Shape, CurSR As ShapeRange, DoIt As Boolean

For CurColNo = iDoc.Palette.Colors.Count To 1 Step -1
DoIt = True
For Each CurPg In iDoc.Pages
Set CurSR = CurPg.Shapes.All
If CurSR.Shapes.Count > 0 Then
For Each CurSh In CurSR.Shapes
'If CurSh.Fill.Type = cdrUniformFill Then CurSh.Fill.UniformColor.ConvertToCMYK
If CurSh.Fill.Type = cdrUniformFill Then

If CurSh.Fill.UniformColor.IsSame(iDoc.Palette.Colors(CurColNo)) Then DoIt = False
End If
__________________
Myron Tracy
Accent Signs
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
Getting a list of all colors in a Document CORNMEN CorelDRAW/Corel DESIGNER VBA 5 15-11-2008 05:14
List the Colors Used in a Document designhouse CorelDRAW/Corel DESIGNER VBA 1 16-10-2007 02:36
How to find out what colors are used in a document? Alex FAQ 1 16-04-2007 21:07
Minimizing the number of colors used in a document Alex FAQ 1 24-05-2005 10:46
How to convert my document colors to grayscale Alex FAQ 1 03-05-2005 14:55


All times are GMT -5. The time now is 06:56.


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