Names are not Tags
and
Tags are not Names
I might want to use the 'ReName' function to Tag objects with different names...
So you can 'Rename' an object to give it a new NAME, or you can add and delete and look for a TAG associated with an object that might have a NAME
Here's a simple example. Just insert a shape onto the first slide
Option Explicit
Sub test()
Dim i As Long
Dim o As Shape
Set o = ActivePresentation.Slides(1).Shapes(1)
o.Tags.Add "TAG1", "VALUE1"
o.Tags.Add "TAG2", "VALUE2"
o.Tags.Add "TAG3", "VALUE3"
o.Name = "MyShapeWithTags"
With ActivePresentation.Slides(1).Shapes("MyShapeWithTags")
MsgBox .Tags("TAG3")
MsgBox .Tags("TAG2")
MsgBox .Tags("TAG1")
MsgBox .Tags("TAG0")
MsgBox .Name
.Name = "NewName"
End With
With ActivePresentation.Slides(1).Shapes("NewName")
MsgBox .Tags("TAG3")
MsgBox .Tags("TAG2")
MsgBox .Tags("TAG1")
MsgBox .Tags("TAG0")
MsgBox .Name
End With
End Sub