View Single Post
 
Old 03-27-2012, 02:53 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi samhdc,

Possibly so. Here's a macro to do the job:
Code:
Sub UpdateObjPath()
Dim StrPath As String, Resp
With Selection
  If .InlineShapes.Count > 0 Then
    With .InlineShapes(1)
      If Not .LinkFormat Is Nothing Then
        While Dir(StrPath) = ""
          Resp = InputBox("Please input the new path & name" & vbCr & _
            "for the first selected inline object", _
            "Link Updater", .LinkFormat.SourceFullName)
          If Resp = "" Then Exit Sub
          StrPath = Resp
        Wend
        .LinkFormat.SourceFullName = StrPath
      Else
        MsgBox "The first selected inline object is embedded, not linked."
      End If
    End With
  ElseIf .ShapeRange.Count > 0 Then
    With .ShapeRange(1)
      If Not .LinkFormat Is Nothing Then
        While Dir(StrPath) = ""
          Resp = InputBox("Please input the new path & name" & vbCr & _
            "for the first selected floating object", _
            "Link Updater", .LinkFormat.SourceFullName)
          If Resp = "" Then Exit Sub
          StrPath = Resp
        Wend
        .LinkFormat.SourceFullName = StrPath
      Else
        MsgBox "The first selected floating object is embedded, not linked."
      End If
    End With
  Else
    MsgBox "No object selected"
  End If
End With
End Sub
Note: The code works for any embedded/linked object, not just pictures, and allows you to update the path & name.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote