Consulting

Results 1 to 8 of 8

Thread: Solved: Locate 'External Content'

  1. #1
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,730
    Location

    Solved: Locate 'External Content'

    PP2007, Vista -- Some how I had 'External Content' in a presentation picture. I assume it was a link to a picture on a slide.

    It took FOREVER by trial and error to track down what I assume was a link, and paste the picture instead of the link.

    Does PP have any facility or option to list the external content in a presentation, including information such as the location and the source?

    Is there a VBA solution to at least loop through the slide and the contents to list information about External Content

    Paul

  2. #2
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,094
    Location
    Paul
    Just checking I understand the question!

    Are you asking how to see the source of a linked picture?
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  3. #3
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,730
    Location
    John -- I was looking to see if there's a non-VBA or a VBA way to locate the external content within a presentation

    In the attached is the slide (out of the original 100+) in the presentation that seems to reference something external

    It was a very tedious trial-and-error process to manually check the presentation.

    I thought there might be a "Show External" button, or

    For each slide in activepresentation
    for each object in slide
    if <some test> then
    Msgbox Object.name on slide number, etc.


    I even tried renaming the PPTX as .ZIP and poked around inside, but could not see anything I recognized

    Thanks

    Paul

  4. #4
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,094
    Location
    Looks like this has been copy pasted from the web and some html code has been included. Have a look at the alt text
    Right click > Size & Position > Alt Text

    You should be able to detect "odd" alt text with vba and cut / paste special as jpg. You will need to detect and reset the left and top and maybe the zorder. Animation if any will be killed.
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  5. #5
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,730
    Location


    Again, you're the Master

    Turns out, that picture was from a Teacher's CD for a course my wife teaches (such use is allowed by the publisher)

    You got me pointed in the right direction, and this is the VBA that I came up with. Not very polished, but enough to allow me to track such things down, and manually "de-link' them

    [vba]
    Option Explicit
    Sub Locate_External_Content()
    Dim oSlide As Slide, oShape As Shape

    For Each oSlide In ActivePresentation.Slides
    For Each oShape In oSlide.Shapes
    Select Case oShape.Type
    Case msoLinkedOLEObject, msoLinkedPicture
    Call MsgBox("Linked Item found" & vbCrLf & vbCrLf & _
    "Slide number " & oSlide.SlideIndex & vbCrLf & vbCrLf & _
    "Shape named " & oShape.Name & vbCrLf & vbCrLf & _
    "Source from " & oShape.LinkFormat.SourceFullName, _
    vbInformation + vbOKOnly, "Locate External Content")
    End Select
    Next
    Next
    End Sub
    [/vba]

    Paul

  6. #6
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,094
    Location
    Thats good! One thing, I was caught out recently with similar code when the client had pasted the linked pic into a placeholder. This didn't show up as a linked picture!

    I used
    [VBA]
    Select Case oshape.Type
    Case Is = msoPlaceholder
    If oshape.PlaceholderFormat.ContainedType = msoLinkedPicture Then[/VBA]
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  7. #7
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,730
    Location
    Thanks - that would have been a HARD one to track down.

    Final (OK, the latest ) version


    [vba]
    Option Explicit
    Private Const cModule As String = "Locate External Content (ver 1.01, 8/10/2009)"
    Sub Locate_External_Content()
    Dim oSlide As Slide, oShape As Shape
    Dim iNumOfLinks As Long

    iNumOfLinks = 0
    For Each oSlide In ActivePresentation.Slides
    For Each oShape In oSlide.Shapes
    With oShape
    Select Case .Type
    Case msoLinkedOLEObject, msoLinkedPicture
    iNumOfLinks = iNumOfLinks + 1
    Call MsgBox("Linked Item found" & vbCrLf & vbCrLf & _
    "Slide number " & oSlide.SlideIndex & vbCrLf & vbCrLf & _
    "Shape named " & .Name & vbCrLf & vbCrLf & _
    "Source from " & .LinkFormat.SourceFullName, _
    vbInformation + vbOKOnly, cModule)
    Case msoPlaceholder
    Select Case .PlaceholderFormat.ContainedType
    Case msoLinkedOLEObject, msoLinkedPicture
    iNumOfLinks = iNumOfLinks + 1
    Call MsgBox("Linked Item in Place Holder found" & vbCrLf & vbCrLf & _
    "Slide number " & oSlide.SlideIndex & vbCrLf & vbCrLf & _
    "Shape named " & .Name & vbCrLf & vbCrLf & _
    "Source from " & .LinkFormat.SourceFullName, _
    vbInformation + vbOKOnly, cModule)
    End Select
    End Select
    End With
    Next
    Next

    Select Case iNumOfLinks
    Case 0
    Call MsgBox("There were no linked objects found", vbInformation + vbOKOnly, cModule)
    Case 1
    Call MsgBox("There was only a single linked objects found", vbInformation + vbOKOnly, cModule)
    Case Else
    Call MsgBox("There were " & iNumOfLinks & " linked objects found", vbInformation + vbOKOnly, cModule)
    End Select

    End Sub

    [/vba]

    Paul

  8. #8

    Thumbs up

    Thanks for writing this bit of code. It was extremely helpful and worked just as advertised. :-)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •