![]() |
#1
|
|||
|
|||
![]()
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! |
#2
|
||||
|
||||
![]()
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] |
#3
|
|||
|
|||
![]()
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...
|
#4
|
||||
|
||||
![]()
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
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
|||
|
|||
![]()
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 |
#6
|
||||
|
||||
![]()
It works for me...
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#7
|
|||
|
|||
![]()
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 |
#8
|
||||
|
||||
![]()
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] |
![]() |
|
![]() |
||||
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 |
![]() |
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 |