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 07-12-2011, 09:10
Coby
Guest
 
Posts: n/a
Default Macro change fountain steps to 999

I am trying to record a Macro that will change the fountain steps in a selected object without changing the color properties. My goal is to be able to select the object and change the steps to 999 without changing the colors. My recorded macro changes the colors to match the one I recoreded it with.

This is what I have:

Sub Fountain_Steps()
' Recorded 12/6/2011
Dim OrigSelection As ShapeRange
Set OrigSelection = ActiveSelectionRange
OrigSelection.ApplyFountainSteps CreateRGBColor(), CreateCMYKColor(0, 0, 0, 0), cdrLinearFountainFill, 267.638815, 999, 8, 50, cdrDirectFountainFillBlend
End Sub


thanks for your help!
Reply With Quote
  #2  
Old 07-12-2011, 11:40
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,791
Blog Entries: 15
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 FountainFills

I would do something like this:
Code:
Sub ChangeFountainSteps()
    Dim s As Shape
    Dim sr As ShapeRange
    
    Set sr = ActiveSelectionRange.Shapes.FindShapes()
    
    For Each s In sr.Shapes
        If s.Fill.Type = cdrFountainFill Then s.Fill.Fountain.Steps = 999
    Next s
End Sub
This code will work with multiple selected shapes, and will also digg into any groups. Hope it helps.

-Shelby
Reply With Quote
  #3  
Old 07-12-2011, 12:00
Coby
Guest
 
Posts: n/a
Default

Worked Perfectly!!! Thanks!
Reply With Quote
Reply

Tags
fountain fills, fountain steps, macro


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
Need Macro to Change Fill Color Then Export to PNG bob CorelDRAW/Corel DESIGNER VBA 1 20-01-2010 18:57
Create fountain fill helper macro wOxxOm CorelDRAW/Corel DESIGNER VBA 21 07-09-2007 14:40
Removing Fountain Fills Macro problem knowbodynow CorelDRAW/Corel DESIGNER VBA 3 09-07-2006 11:10
I cant change fountain fill steps in property bar? Kursad General 1 24-05-2006 08:40
How can I change middle colors in a custom Fountain Fill Steve CorelDRAW/Corel DESIGNER VBA 3 13-12-2002 19:11


All times are GMT -5. The time now is 12:05.


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