Apply chart template from local chart, not template file

Viewed 130

I currently use this line to apply a chart template to many charts in my file (while looping through them):

cht.ApplyChartTemplate ("H:\Company\My Company\Stats\PChart Template.crtx")

This works fine - however, I would like to host a local chart in my file that can server as the "master" chart, and apply that theme to my charts - this way I can easily change the theme if/when needed.

The documentation for .ApplyChartTemplate only takes a filename argument - is there anyway to manipulate this to take a local chart instead? I haven't seen any workarounds in my searches.

1 Answers

You can use VBA to export the chart as a template, using a temporary file, then apply that exported template.

Eg.:

myMasterChart.SaveChartTemplate ("C:\Temp\Chart1.crtx")
Related