OberonPlace.com Forums

OberonPlace.com Forums (http://forum.oberonplace.com/index.php)
-   CorelDRAW/Corel DESIGNER VBA (http://forum.oberonplace.com/forumdisplay.php?f=16)
-   -   Changing Palettes (http://forum.oberonplace.com/showthread.php?t=7122)

nic 16-08-2010 08:27

Changing Palettes
 
Hi

Im using X5 and have about 20 palettes which Ive named 01 to 20 and am trying to find a way of looping thru them to create 20 images which have the same shapes but are coloured differently based upon the palettes.

I have tried recording a macro but dont see any reference to palettes in the macro. Is it possible and if so would somebody mind helping ?

thanks
nic

runflacruiser 16-08-2010 09:24

Hi.
You can loop palettes like this:

Code:

Sub palLoop()


Dim pal As Palette

    For Each pal In Palettes
        'do some thing with palette
    Next pal

End Sub

-John :)

runflacruiser 16-08-2010 09:29

Hi.
I haven't tested but this might help too:

Code:

Sub palLoop2()


Dim pal As Palette, i As Variant, myStr As String

    For i = 1 To 20
        If CStr(Len(i)) = 1 Then i = "0" & i
        Palettes(i).Open
    Next i

End Sub

-John :)

nic 19-08-2010 19:16

thanks
 
thanks again
n


All times are GMT -5. The time now is 00:34.

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