Solved

Default Colors in Microsoft Office Excel Chart OLE Objects

Posted on 2011-02-24
7
720 Views
Last Modified: 2012-05-11
I am using a Powerpoint 2007 add-in that works specifically with Microsoft Office Excel Chart OLE Objects ("Insert > Object > Microsoft Office Excel Chart"). I have setup a custom color pallet in both PowerPoint and Excel that is used as the default in new PPT and XLS files. However, when I insert a Microsoft Office Excel Chart OLE Object into a PowerPoint file, this custom color pallet is not used as the default. Instead, the colors revert back to the "Office" pallet. Does anyone know why these embedded objects don't use the color pallet that I have defined in the "XLSTART\book.xltx" template? Even better, does anyone know how I get the default color pallet to be anything other than "Office" for these embedded Microsoft Office Excel Chart OLE Objects?
0
Comment
Question by:ff13056
[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
  • 3
  • 2
7 Comments
 
LVL 19

Expert Comment

by:Arno Koster
ID: 34969389
Have you tried saving the chart as a chart template (crtx) ?

from Excel 2007 for dummies in google books format :
Google books link
0
 

Author Comment

by:ff13056
ID: 34972040
Thanks for the reply. I tried your suggestion and it worked, but I'm wondering if there is a solution that has a more global effect. The CRTX option works on a chart-by-chart basis, but I have presentations with 30-40 charts embedded in them, each of a different size and type, so creating and using that many chart templates would be difficult to manage. Is there a way to simply change the colors in the "Office" color pallet? If I could change them globally I think that would solve my problem. Can the colors in the Office pallet be changed? Can the colors in the Office pallet be changed?
0
 
LVL 19

Expert Comment

by:Arno Koster
ID: 35016300
Apperently, Excel and Powerpoint uses color themes, but they are not linked !

E.G. when excel uses an arbitrary excel theme, then copies a chart which is pasted in powerpoint, the active powerpoint theme will be applied to the chart.
It seems that the themes themselves are linked, when I change a custom theme in powerpoint, the corresponding theme in excel is updated as well.

Thus the problem seems to be that powerpoint does not default to the correct custom theme. Can you verify that when you manually select the correct custom theme, charts are pasted as you expect them to be ?

If not, you might want to think about pasting charts as pictures :
click on "Paste special", select "Bitmap" (or any other picture type)


0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:ff13056
ID: 35019450
When they first get inserted into the PPT the colors are correct. I have the same theme selected in PPT and Excel, which appears to be working. However, when I run a procedure that updates the chart with new data the colors in the chart revert back to the Office theme. Unfortunately going the picture format route is not an option, as these charts are dynamic and will continuously be updated with new data.
0
 
LVL 19

Accepted Solution

by:
Arno Koster earned 500 total points
ID: 35034816
You could update the procedures to refresh the images, rather than the data, such as in

http://www.vbaexpress.com/forum/showthread.php?t=392

although this is merely a quick fix, i'd rather use code like this :
Sub discover_theme_color_values()

    Set scheme = ActivePresentation.Slides(1).ThemeColorScheme
    For t = 1 To scheme.Count
        Debug.Print "theme color " & t & " has RGB value " & scheme(t)
    Next

End Sub

Open in new window


with the code above, you can get the RGB color values for the active theme. You can then reinforce these values after updating the charts using a function such as below. You can choose to type out the names of the theme colors (upper part of the reinforce sub), or use the values as found in the debug output as in the lower part of the reinforce sub.
 
Sub reinforce_theme_color_values()

    ActivePresentation.Slides(1).ThemeColorScheme(msoThemeDark1) = 12611584
    ActivePresentation.Slides(1).ThemeColorScheme(msoThemeLight1) = 15784390
    [...] 
    ActivePresentation.Slides(1).ThemeColorScheme(1) = 12611584
    ActivePresentation.Slides(1).ThemeColorScheme(2) = 15784390
End Sub

Open in new window


0
 
LVL 24

Expert Comment

by:broomee9
ID: 35356940
This question has been classified as abandoned and is being closed as part of the Cleanup Program. See my comment at the end of the question for more details.
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

How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

630 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