Hi,
Below macro gives each chart or table a unique name (mychart1... mychart2...) in the entire PowerPoint deck.
However, can someone modify it so that it should restart on every slide. For example on 1st slide there are two charts... so it should be mychart1 & mychart2, on 2nd slides again it should start with mychart1 and so on.
Thanks,![]()
Public Sub RenameOnSlideObjects() Dim oSld As Slide Dim oShp As Shape i = 1 For Each oSld In ActivePresentation.Slides For Each oShp In oSld.Shapes With oShp Select Case True Case .Type = msoChart .Name = "myChart" + cstr(i) I=i+1 Case .Type = msoTable .Name = "myTable" + cstr(i) I=i+1 End Select End With Next Next End Sub
Charm
Bookmarks