How to Use Color Palette of PowerPoint( Office )Using Visual Basi

G

Guest

Hi,
I am doing Simulation in PowerPoint Using Visual Basic..I am using the color
palette of Windows in my Coding,But i want to use the color palette of
PowerPoint(office) Using Visual Basic.But i dont have any idea how to to use
the color palette of PowerPoint through Visual Basic.
If Any one has got any idea how to use the color palette of Powerpoint using
Visual Basic plz Suggest me how to do tht.

Thanks
Amrish
 
S

Steve Rindsberg

Hi,
I am doing Simulation in PowerPoint Using Visual Basic..I am using the color
palette of Windows in my Coding,But i want to use the color palette of
PowerPoint(office) Using Visual Basic.But i dont have any idea how to to use
the color palette of PowerPoint through Visual Basic.
If Any one has got any idea how to use the color palette of Powerpoint using
Visual Basic plz Suggest me how to do tht.

What do you need to do with the color palette? Assign colors from it to shapes
on a slide or something entirely different?
 
G

Guest

yes steve i want to add the color to the shape in my slide,but doing that we
have to acess the color palette that is there in the powerpoint.
Here right now i am using a button when the the user click on it opens the
windows default color palette & allows user to select the color, so that the
same color is visble on the shape.i am acessing it using this
"comDlg.Color"(this is default Windows Color Palette) .
But I want to acess color palette of powerpoint (this is a part of the
requirements specification for our application). So, how can i acess the
color palette? I don;t want to show the windows default color palette but the
powerpoints color palette.

Right now i am doing my coding in VISUAL BASIC.

Thanks
Amrish
 
S

Steve Rindsberg

I don't think there's a practical way of using the PowerPoint palette for your own
purposes, but what if you create your own userform that duplicates it as closely as
possible?

Here's one way to get the color values you'll need:

Sub BeMyPalette()

Dim x As Long

Debug.Print "Scheme Colors"
With ActivePresentation.Slides(1).ColorScheme
For x = 1 To .Count
Debug.Print .Colors(x)
Next
End With
Debug.Print "Extra Colors"
With ActivePresentation.ExtraColors
For x = 1 To .Count
Debug.Print .Item(x)
Next
End With

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top