Hello friends,
Please help me on this vba code.
I am using the following code for changing ppt charts to pictures (emf).
In each slide, there are 5 charts. One chart is in chart placeholder.
If I run the below vba code, the empty chart placeholder appears and some charts are left out. if I again run the same code for 2 to 3 times, it is converting the remaining charts to emf.
Set oSlides = ActiveWindow.Presentation.Slides
For Each oSld In oSlides
Set oShapes = oSld.Shapes
shapecount = oShapes.Count
For j = 1 To shapecount
If oShapes(j).HasChart Then
left1 = oShapes(j).Left
top1 = oShapes(j).Top
oShapes(j).Cut
ActiveWindow.View.PasteSpecial ppPasteEnhancedMetafile
Set oShapeRange = ActiveWindow.Selection.ShapeRange
oShapeRange.Left = left1
oShapeRange.Top = top1
End If
Next j
Next oSld
Thanks for your help.