Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Default Colors in Microsoft Office Excel Chart OLE Objects

Posted on 2011-02-24
7
Medium Priority
?
739 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
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

 

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 2000 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:Tracy
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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

I was prompted to write this article after the recent World-Wide Ransomware outbreak. For years now, System Administrators around the world have used the excuse of "Waiting a Bit" before applying Security Patch Updates. This type of reasoning to me …
New style of hardware planning for Microsoft Exchange server.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

730 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