OK
If you add you shape like this:
The added shape will have an invisible tagSub addTitre() Dim sld As Slide Dim shpTitre As Shape On Error Resume Next Set sld = ActiveWindow.View.Slide If Not sld Is Nothing Then Set shpTitre = sld.Shapes.AddTextbox(msoTextOrientationHorizontal, 36, 21.62504, 648, 90) shpTitre.Tags.Add "TYPE", "TITRE" End If End Sub
You can check for the shape on any slide using a function:
To check whether titre is present on a particular slideFunction IsTitre(sld As Slide) As Boolean Dim oshp As Shape For Each oshp In sld.Shapes If oshp.Tags("TYPE") = "TITRE" Then IsTitre = True Exit For End If Next oshp End Function
Msgbox IsTitre(sld) 'where sld is a reference to the slide




Reply With Quote