A seguinte função do VBA demonstra como classificar um determinado objeto PowerPoint.Shape usando a marca especial:
Sub CheckShape(oShape As PowerPoint.Shape)
Dim str As String
str = oShape.Tags.Item(Name:="thinkcellShapeDoNotDelete")
If (str = "" Or Left$(str, 1) <> "t") Then
MsgBox "PowerPoint shape"
Else
If str = "thinkcellActiveDocDoNotDelete" Then
MsgBox "think-cell ActiveDocument"
Else
MsgBox "think-cell shape"
End If
End If
End Sub
Você pode usar essa função para identificar todas as formas no slide ativo:
Sub Test()
Dim oShape As PowerPoint.Shape
For Each oShape In ActiveWindow.View.Slide.Shapes
Call CheckShape(oShape)
Next oShape
End Sub
Observe que a coleção de marcas de cada forma também é copiada sempre que você copia uma forma, por ex. copiando e colando o think-cell chart. O CheckShape reportará a forma do think-cell para todas as formas que pertencem a um gráfico do think-cell, mesmo que uma forma tenha sido copiada e colada em outra apresentação.
Você também pode se interessar por KB0107: Como posso copiar-colar gráficos do think-cell no meu código VBA?