Solved

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

Posted on 2014-02-18
4
739 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:versatilebb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 50

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 50

Accepted Solution

by:
Rgonzo1971 earned 300 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:versatilebb
ID: 39871248
Brightness.  Who knew?

Thanks.  Just what I needed.
0

Featured Post

Industry Leaders: 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

Suggested Solutions

Microsoft Office Picture Manager was included in Office 2003, 2007, and 2010, but not in Office 2013. Users had hopes that it would be in Office 2016/Office 365, but it is not. Fortunately, the same zero-cost technique that works to install it with …
Using Word 2013, I was experiencing some incredible lag when typing.  Here's what worked for me....
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

726 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