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 10-05-2018, 17:07
mtracy mtracy is offline
Junior Member
 
Join Date: Jun 2012
Location: Niceville, Florida
Posts: 21
Default Document Colors

How can I reset the document colors with a macro?

I can cycle it on/off but can't figure out how to "reset" it. Once a color shape is deleted the doc palette still shows the color until you click thru and hit reset.

Sub RefreshDocPalette()
ActiveDocument.Palette.Close

ActiveDocument.Palette.Open

End Sub

P.s. why after hitting "reset palette" does it add a black swatch even though there's no black used in the doc.
__________________
Myron Tracy
Accent Signs
Reply With Quote
  #2  
Old 10-05-2018, 17:11
mtracy mtracy is offline
Junior Member
 
Join Date: Jun 2012
Location: Niceville, Florida
Posts: 21
Default

One suggestion is close but it deletes all the colors. As one is "doodling" lots of colors get added to the document coors palette. Even after you delete a bunch of different colored shapes. Manually hit reset and only the colors that exist in the document are displayed.
__________________
Myron Tracy
Accent Signs
Reply With Quote
  #3  
Old 10-05-2018, 17:11
mtracy mtracy is offline
Junior Member
 
Join Date: Jun 2012
Location: Niceville, Florida
Posts: 21
Default

Oops, forgot to add the suggestion

For i = ActiveDocument.Palette.Colors.Count To 1 Step -1
ActiveDocument.Palette.RemoveColor (i)
Next i
__________________
Myron Tracy
Accent Signs
Reply With Quote
  #4  
Old 18-05-2018, 05:31
shark shark is offline
Senior Member
 
Join Date: Aug 2010
Location: Russia, Belgorod
Posts: 132
Default

Hi
If you programmatically delete shape then you can check if there are any other objects of the same color left. And then delete this color from palette
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 17:34.


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