How can I update all linked pictures that are embedded in PowerClips?

I found this script by GDG_John()

Sub updateLinks()

    Dim s As Shape, sr As ShapeRange
   
    Set sr = ActivePage.Shapes.FindShapes(, cdrBitmapShape)
    For Each s In sr
        If s.Bitmap.ExternallyLinked Then
            s.Bitmap.UpdateLink
        End If
    Next s
End Sub

It works fine with pictures that are not set into PowerClips, those will not update. Is it possible to add this feature?

All pictures shall be updated.

Thanks

  • Sub UpdateLinksPWC()
    Dim s As Shape, sp As Shape
    Dim pwc As PowerClip
    For Each s In ActivePage.Shapes
    Set pwc = Nothing
    On Error Resume Next
    Set pwc = s.PowerClip
    On Error GoTo 0
    If Not pwc Is Nothing Then
    For Each sp In pwc.Shapes
    If sp.Type = cdrBitmapShape Then
    If sp.Bitmap.ExternallyLinked Then
    sp.Bitmap.UpdateLink
    End If
    End If
    Next sp
    End If
    If s.Type = cdrBitmapShape Then
    If s.Bitmap.ExternallyLinked Then
    s.Bitmap.UpdateLink
    End If
    End If
    Next s
    End Sub