OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > CorelDRAW/Corel DESIGNER VBA

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 21-10-2012, 22:30
knowbodynow knowbodynow is offline
Senior Member
 
Join Date: Mar 2006
Location: Hatsukaichi near Hiroshima
Posts: 430
Default Match Fill Color to Outline Color

The following code matches the color of an oultine to a fill:

Code:
Sub matchOutlinetoFill()

Dim sh As Shape
    
For Each sh In ActiveSelection.Shapes
    If sh.Fill.Type = cdrUniformFill Then
        sh.Outline.Color.CopyAssign sh.Fill.UniformColor
    End If
Next sh
    
End Sub
But how to reverse this so that the fill becomes the same colour as the outline? Thanks
Reply With Quote
  #2  
Old 21-10-2012, 23:09
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,769
Blog Entries: 9
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 Match Fill Color to Outline Color

This should do the trick:
Code:
Sub MatchFilltoOutline()
    Dim s As Shape
    
    For Each s In ActiveSelectionRange.Shapes
        If s.Outline.Type = cdrOutline Then
            s.Fill.ApplyUniformFill s.Outline.Color
        End If
    Next s
End Sub
-Shelby
Reply With Quote
  #3  
Old 24-10-2012, 17:59
knowbodynow knowbodynow is offline
Senior Member
 
Join Date: Mar 2006
Location: Hatsukaichi near Hiroshima
Posts: 430
Default

Thanks, Shelby, it did.
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
Outline Color Replacing norbert_ds CorelDRAW/Corel DESIGNER VBA 21 12-12-2007 01:06
Help with Color Number Input and Fill JudyHNM CorelDRAW/Corel DESIGNER VBA 2 08-11-2007 11:39
Contour Fill Color shelbym CorelDRAW/Corel DESIGNER VBA 1 23-10-2005 10:16
Changing The Color and The Outline Width At The Same Time katrina63 New product ideas 1 22-06-2005 20:19
Setting Outline Color AC CorelDRAW/Corel DESIGNER VBA 1 18-03-2003 19:33


All times are GMT -5. The time now is 04:01.


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