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
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