Hi,
I have more than 100 charts on Powerpoint from the same Excel and I would like to filter them automatically as they should be filtered with the same category.
My code is:
Thanks in advance,
EctorUR
I have more than 100 charts on Powerpoint from the same Excel and I would like to filter them automatically as they should be filtered with the same category.
My code is:
VBA Code:
'Loop through each slide in the presentation
For Each pptSlide In pptPresentation.Slides
'Loop through each shape in each slide
For Each pptShape In pptSlide.Shapes
'Find out if the shape is a linked object or a linked picture
If (pptShape.Type = msoLinkedPicture) Or (pptShape.Type _
= msoLinkedOLEObject) Or (pptShape.HasChart = msoTrue) Or _
(pptShape.Type = msoLinkedGraphic) Or (pptShape.Type = msoChart) Then
With pptShape.ChartGroups(1)
.FullCategoryCollection(1).IsFiltered = True
.FullCategoryCollection(3).IsFiltered = True
.FullCategoryCollection(4).IsFiltered = True
.FullCategoryCollection(5).IsFiltered = True
.FullCategoryCollection(6).IsFiltered = True
.FullCategoryCollection(7).IsFiltered = True
.FullCategoryCollection(8).IsFiltered = True
.FullCategoryCollection(9).IsFiltered = True
.FullCategoryCollection(10).IsFiltered = True
.FullCategoryCollection(11).IsFiltered = True
.FullCategoryCollection(12).IsFiltered = True
.FullCategoryCollection(13).IsFiltered = True
.FullCategoryCollection(14).IsFiltered = True
End With
End If
Next
Next
Thanks in advance,
EctorUR