Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-22-2012, 07:28 AM
samhdc samhdc is offline Determining file path for linked image in Word 2007 Windows XP Determining file path for linked image in Word 2007 Office 2007
Novice
Determining file path for linked image in Word 2007
 
Join Date: May 2011
Posts: 9
samhdc is on a distinguished road
Default Determining file path for linked image in Word 2007

We have reports with hundreds of photographs, all linked. We are currently using Word 2007. How do I find the filepath for a particular linked image? I know how to use the Prepare / Edit Links function to see a list of ALL of the links, but I cannot tell from the list which image is which.

In Word 2003, I used to be able to select the image and toggle to the path with F9. How do I do that in Word 2007? It seems like I should be able to select an image in the file, and then the Edit Links list should have that file highlighted, but that doesn't seem to be the case.

Thanks for any help!
Reply With Quote
  #2  
Old 03-22-2012, 07:41 AM
macropod's Avatar
macropod macropod is offline Determining file path for linked image in Word 2007 Windows 7 64bit Determining file path for linked image in Word 2007 Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
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,

The only ways to do that in Word 2007 & later are (a) with a macro; or (b) saving the document to the .doc format so that you can use Shift-F9 or Alt-F9 to view the path.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 03-27-2012, 02:24 PM
samhdc samhdc is offline Determining file path for linked image in Word 2007 Windows XP Determining file path for linked image in Word 2007 Office 2007
Novice
Determining file path for linked image in Word 2007
 
Join Date: May 2011
Posts: 9
samhdc is on a distinguished road
Default

Thanks, Paul. I think we might have had this same conversation about a year ago. I was hoping WORD had patched in an improvement... I just posted another thread about a different problem we're having with photos in Word 2007. Again, 2003 worked well for us, and the later version does not...
Reply With Quote
  #4  
Old 03-27-2012, 02:53 PM
macropod's Avatar
macropod macropod is offline Determining file path for linked image in Word 2007 Windows 7 64bit Determining file path for linked image in Word 2007 Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
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
  #5  
Old 01-23-2015, 08:42 AM
OxonOwl OxonOwl is offline Determining file path for linked image in Word 2007 Windows 7 64bit Determining file path for linked image in Word 2007 Office 2007
Novice
 
Join Date: Jan 2015
Posts: 2
OxonOwl is on a distinguished road
Default

I have tried the code above and some variations but the .LinkFormat.SourceFullName = StrPath executes without error but does not change the value of SourceFullName.

It is as if it is locked or read-only but I cannot see that this is the case.

Any suggestions?

TIA
Reply With Quote
  #6  
Old 01-23-2015, 04:47 PM
macropod's Avatar
macropod macropod is offline Determining file path for linked image in Word 2007 Windows 7 64bit Determining file path for linked image in Word 2007 Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
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

It works for me...
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #7  
Old 01-26-2015, 07:02 AM
OxonOwl OxonOwl is offline Determining file path for linked image in Word 2007 Windows 7 64bit Determining file path for linked image in Word 2007 Office 2007
Novice
 
Join Date: Jan 2015
Posts: 2
OxonOwl is on a distinguished road
Default

The code seems to work when the image is just a linked image in the document but not when it is a linked image inside a content control. The content control is not locked.

Any ideas?

TIA
Reply With Quote
  #8  
Old 01-26-2015, 04:21 PM
macropod's Avatar
macropod macropod is offline Determining file path for linked image in Word 2007 Windows 7 64bit Determining file path for linked image in Word 2007 Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
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

Change:
Dim StrPath As String, Resp
to:
Dim StrPath As String, Resp, i As Long, sngX As Single, sngY As Single, bRatio As Boolean, iShp As InlineShape

Below:
.LinkFormat.SourceFullName = StrPath
insert:
Code:
        i = ActiveDocument.Range(0, Selection.Range.Start).ContentControls.Count 
        If i > 0 Then
          With ActiveDocument.ContentControls(i)
            If Selection.Range.InRange(.Range) Then
              If .Type = wdContentControlPicture Then
                With .Range.InlineShapes(1)
                  sngX = .Width
                  sngY = .Height
                  bRatio = .LockAspectRatio
                  .Delete
                End With
                Set iShp = .Range.InlineShapes.AddPicture(StrPath, True, True)
                With iShp
                  .LockAspectRatio = bRatio
                  .Width = sngX
                  If bRatio = True Then
                    If .Height > sngY Then .Height = sngY
                  Else
                    .Height = sngY
                  End If
                End With
              End If
            End If
          End With
        End If
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to get image in clip draw by giving path gsrikanth Office 0 03-22-2012 05:03 AM
Determining file path for linked image in Word 2007 File Path for Outlook 2007 pst eliz.bell Outlook 2 10-29-2011 07:04 PM
Display Full File Path Name of Document in Title bar MS-Word 2010 Carlos06x Word 1 10-12-2011 10:39 AM
Excel File as Linked Object in Word jfitch Word 0 03-18-2010 11:44 AM
Programmatically get File Path for currently opened WORD document franferns Word 1 11-26-2009 12:36 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:11 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft