TPE
Tavvafi@gmail.com |
≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
Sub ID_The_Slides() Dim oSl As Slide Dim sPresName As String Dim sTagName As String sPresName = ActivePresentation.FullName sTagName = "Provenance" For Each oSl In ActivePresentation.Slides With oSl.Tags ' Is it already tagged as coming from this presentation? ' If so, the last part of the tag will be the ' the presentation name; no need to tag it again If Not Right$(.Item(sTagName), Len(sPresName)) = sPresName Then ' if no tag at all, just add the presentation name If Len(.Item(sTagName)) = 0 Then oSl.Tags.Add sTagName, sPresName Else ' or tack pres name to end of existing tag oSl.Tags.Add sTagName, _ Trim(oSl.Tags(sTagName)) _ & "|" _ & sPresName Debug.Print .Item(sTagName) End If End If End With Next End Sub Sub Clear_The_Tags() Dim oSl As Slide Dim sTagName As String sTagName = "Provenance" For Each oSl In ActivePresentation.Slides oSl.Tags.Add sTagName, "" Next End Sub Sub Show_Source() ' Where'd this slide come from? Dim sMsg As String Dim aMsg As Variant Dim x As Long Dim sTagName As String sTagName = "Provenance" With ActiveWindow.Selection.SlideRange(1) If Len(.Tags(sTagName)) > 0 Then aMsg = Split(.Tags(sTagName), "|") For x = 0 To UBound(aMsg) sMsg = sMsg & aMsg(x) & vbCrLf Next End If End With If Len(sMsg) > 0 Then MsgBox sMsg Else MsgBox "No source information available" End If