recolor embedded excel charts in PPT 2000 Engl. with vba

T

tito harris

Hello everyone,

I am writing a converter in vba (PPT2000 English) to convert our
presentations from the old layout to the new company layout. I am trying to
make shure that the embedded excel charts use the new colorscheme in
powerpoint...

This works if I do it manually:
1. Select Excel Chart
2. In the Toolbar 'Picture' click the symbol 'Recolor Excel Chart'
3. Choose the option 'Entire Color scheme' and click 'OK'...
Then the program updates the colors correctly

I am trying to do the same in VBA (code below). The code runs without a
problem and the excel chart has the property ppFollowColorsScheme when I
check manually....BUT the colors are not updated...can somebody help?

Thanks for your help in advance and greetings from Switzerland...
tito
---------------------------------------------------------
thApplyColorSchemeToExcelCharts()
Dim sld As Slide
Dim sh As Shape

For Each sld In ActivePresentation.Slides
For Each sh In sld.Shapes
If sh.Type = msoLinkedOLEObject Or sh.Type = msoEmbeddedOLEObject
Then
If sh.OLEFormat.ProgID = "Excel.Chart" Or sh.OLEFormat.ProgID
= "Excel.Chart.8" Then
sh.OLEFormat.FollowColors = ppFollowColorsScheme
End If
End If
Next
Next
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top