Supercharge your PowerPoint productivity with
Supercharge your PPT Productivity with PPTools - Click here to learn more.

PPTools

Image Export converts PowerPoint slides to high-quality images.

PPT2HTML exports HTML even from PowerPoint 2010 and 2013, gives you full control of PowerPoint HTML output, helps meet Section 508 accessibility requirements

Merge Excel data into PowerPoint presentations to create certificates, awards presentations, personalized presentations and more

Resize your presentations quickly and without distortion

Language Selector switches the text in your presentation from one language to another

FixLinks prevents broken links when you distribute PowerPoint presentations

Shape Styles brings styles to PowerPoint. Apply complex formatting with a single click.

Prep4PDF preserves interactivity in PowerPoint presentations when you convert to PDF

Identify each slide so its source can be tracked

Problem

You have a lot of different presentations and you often copy slides from one presentation to another. You want to be able to track where a slide came from originally and what other presentations it's appeared in.

Solution

The macro below will help. The code here will:

This is just a start. You might want to:

As one of our other PPT MVPs says: "It's only code."

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

End Sub

See How do I use VBA code in PowerPoint? to learn how to use this example code.


Did this solve your problem? If so, please consider supporting the PPT FAQ with a small PayPal donation.
Page copy protected against web site content infringement by Copyscape Contents © 1995 - 2015 Stephen Rindsberg, Rindsberg Photography, Inc. and members of the MS PowerPoint MVP team. You may link to this page but any form of unauthorized reproduction of this page's contents is expressly forbidden.
Español    Deutsch    Français    Português    Italiano    Nederlands    Greek    Japanese    Korean    Chinese

Supercharge your PPT Productivity with PPTools

content authoring & site maintenance by
Friday, the automatic faq maker (logo)
Friday - The Automatic FAQ Maker

Identify each slide so its source can be tracked
http://www.pptfaq.com/FAQ01123_Identify_each_slide_so_its_source_can_be_tracked.htm
Last update 07 July, 2011
Created: