?
Solved

How do I set a SHADE of a theme color in Office 2010 using VBA

Posted on 2014-02-18
4
Medium Priority
?
853 Views
Last Modified: 2014-02-19
In PowerPoint 2010, I know how to set the color of an object to a theme color using VBA, for example:
myshape.Line.ForeColor.ObjectThemeColor = 4

Open in new window

But what is the correct way to set it to one of the shades of the theme color as illustrated in the palette below the theme colors themselves, for example the 4th color, 3rd shade down as circled in red?
shadeAre these shades directly addressable?  If so, how?

Or do you have to use TintAndShade method?  I tried that, but it doesn't seem to work for me.

Thanks.
shadeoftheme.JPG
0
Comment
Question by:Bryce Bassett
  • 2
4 Comments
 
LVL 54

Expert Comment

by:Rgonzo1971
ID: 39869908
Hi,
You should use .Brightness

to replicate the choice in the ribbon

use one of these
myshape.Line.ForeColor.ObjectThemeColor = 4
'myshape.Line.ForeColor.Brightness = 0
'myshape.Line.ForeColor.Brightness = 0.8
'myshape.Line.ForeColor.Brightness = 0.6
myshape.Line.ForeColor.Brightness = 0.4 ' In your case
'myshape.Line.ForeColor.Brightness = -0.25
'myshape.Line.ForeColor.Brightness = -0.5

Open in new window

Regards
0
 
LVL 23

Expert Comment

by:JSRWilson
ID: 39870183
That's a good find. The help for brightness is appalling and for tintandshade worse!

I would have thought it would be  TintAndShade with those exact values but in PowerPoint it doesn't work! (It does in Word)
0
 
LVL 54

Accepted Solution

by:
Rgonzo1971 earned 1200 total points
ID: 39870225
Correction of my Post

You have to adapt the percentage according to your palette

wait for the tool tip appearing at your colour  and then adjust the Brightness accordingly

Darker 25% : means .Brightness = -0.25
Lighter 40% : means .Brightness = 0.4

Regards
0
 

Author Closing Comment

by:Bryce Bassett
ID: 39871248
Brightness.  Who knew?

Thanks.  Just what I needed.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft has changed the look and feel of Azure AD and Microsoft account sign-in pages so that you will have a more unified look and feel when moving between the two interfaces.
Currently, there is an issue with being able to copy values from an external application to a dropdown list in Project Web Access (PWA).  The standard copy and paste methods don't seem to work properly. Here is a way to accomplish this task to s…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question