The following VBA function demonstrates how to classify a given PowerPoint.Shape object using the special tag:
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
You can use this function to identify all shapes on the active slide:
Sub Test() Dim oShape As PowerPoint.Shape For Each oShape In ActiveWindow.View.Slide.Shapes Call CheckShape(oShape) Next oShape End Sub
Please note that the tags collection of each shape is also copied whenever you copy a shape, e.g., by copying and pasting the think-cell chart. CheckShape will report think-cell shape for all shapes that have been part of a think-cell chart even if a shape has been copied and pasted into another presentation.
You may also be interested in KB0107: How can I copy-paste think-cell charts in my VBA Code?