Solved

Default Colors in Microsoft Office Excel Chart OLE Objects

Posted on 2011-02-24
7
684 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
  • 3
  • 2
7 Comments
 
LVL 19

Expert Comment

by:akoster
Comment Utility
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
Comment Utility
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:akoster
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:ff13056
Comment Utility
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:
akoster earned 500 total points
Comment Utility
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
Comment Utility
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction In all recent versions of PowerPoint it is possible to trigger animations. This means the animation takes place when a certain shape is clicked. This allows you to run animation “on demand” and outwith the normal sequence of mouse cl…
Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

743 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now