Wednesday, August 15, 2012 1:44 PM
I am trying to change the color of a series element programmatically. Unfortunately I cannot find a way to detect the currently selected element.
I have already tried this solution: http://social.msdn.microsoft.com/Forums/en-US/officegeneral/thread/8df1014d-c0c9-4ce5-ad76-cf81455b8f3c
Unfortunately this works only for specific languages and only if the format ribbon tab is currently active. I need a solution which works e.g. in english, german and japanese, and when another ribbon tab than the format ribbon tab is active. Therefore I am wondering if there are other solutions to identify the current selected series element of a PowerPoint Chart or if it is maybe possible to trigger the built-in color picker with a specific RGB value?
Best regards and thanks in advance
Friday, August 17, 2012 5:13 AMModerator
Thanks for posting in the MSDN Forum.
I will involve some experts into your issue to see whether they can help you. There might be some time delay, appreciate for you patenice.
Have a good day,
Tom Xu [MSFT]
MSDN Community Support | Feedback to us
Friday, August 31, 2012 11:16 PM
Hi Daniel Schmidt,
Are you able to explain to me what your actual goal is, as in what exactly are you trying to achieve and why? Also VBA is language neutral so i am not certain why the language question would be a factor. The code in English will work on a machine with any language.
The code sample works with the selection object so the Chart Tools ribbon will be selected.
If a user selects a series element, this will cause the ribbon to be activated.
It is possible to change the fill for a data series without using the selection and having the Chart Tools in focus.
Dim chrt As Chart
Dim sc As SeriesCollection
Dim seri As Series
Set chrt = ActivePresentation.Slides(1).Shapes(1).Chart
Set seri = chrt.SeriesCollection(1)
.Visible = msoTrue
.ForeColor.ObjectThemeColor = msoThemeColorAccent2
.ForeColor.TintAndShade = 0
.ForeColor.Brightness = 0
.Transparency = 0
Let me know if this works for you. Thanks for your time and effort.
- Edited by Arthur Ch - MSFTMicrosoft Employee Monday, September 10, 2012 4:08 PM
Monday, September 03, 2012 8:20 AM
Thank you for your response.
Unfortunately your solution is not what I am looking for. The problem is to detect the currently selected element of a chart series, e.g. just one bar of a bar chart.
Please let me know if you need further information.
Tuesday, September 11, 2012 3:45 AM
Thanks for the response and the correction. After some research on this, this doesn't seem to be feasible unfortunately. We could not find a way to determine which series has been selected and some of these Chart events also aren't exposed in PowerPoint.
Thanks for your time and effort.