Thread: Document Colors
View Single Post
  #16  
Old 08-06-2018, 16: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