Link to home
Start Free TrialLog in
Avatar of glaurin
glaurinFlag for Canada

asked on

Word document file is not opening the hyperlink pictures?

I has a word document 420 pages, 14,267 word, 32 MB. and they have 44 folders of pictures.
I have copied both the Word document and the folders of images to flash drives and my Seagate backup drive. The problem is that the Word document and the images will only open on my computer. On other computers, only the Word document pulls up with no linked pictures.  Therefore, I can only print the entire project (420 pages) from my own computer.  I assume this is because the images were linked from their original source on my computer, rather than imbedded in the document.
Are there other hidden control file I need to copy?
ASKER CERTIFIED SOLUTION
Avatar of Kimputer
Kimputer

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You could try running a VBA macro like this:
Sub Unlink()
Dim sh As Shape
Dim ilsh As InlineShape
For Each sh In ActiveDocument.Shapes
    With sh
        If .Type = msoLinkedPicture Then
            .LinkFormat.Update
            If Not .LinkFormat Is Nothing Then 'update may break the link anyway
                .LinkFormat.BreakLink
            End If
        End If
    End With
Next sh
For Each ilsh In ActiveDocument.InlineShapes
    With ilsh
        If .Type = wdInlineShapeLinkedPicture Then
            .LinkFormat.Update
            If Not .LinkFormat Is Nothing Then 'update may break the link anyway
                .LinkFormat.BreakLink
            End If
        End If
    End With
Next ilsh

End Sub

Open in new window

Avatar of Kimputer
Kimputer

My original post was wrong with the ..\, it should have been .\

But @GrahamSkan's post brought me to this:

Sub Relativelink()

Dim ilsh As InlineShape
For Each ilsh In ActiveDocument.InlineShapes
    With ilsh
        If .Type = wdInlineShapeLinkedPicture Then
            .LinkFormat.SourceFullName = ".\" + Split(.LinkFormat.SourceFullName, "\")(UBound(Split(.LinkFormat.SourceFullName, "\")))
        End If
    End With
Next ilsh

End Sub

Open in new window


(might need to be updated to the Shapes code instead of InlineShape)
I.e. this solution is only useful if you move the doc and pictures to one folder (no subfolders involved).
Avatar of glaurin

ASKER

Thank you for this solution, once I open to edit the .xml.rels file it gave me the picture path that happen to be in several location on the hard drive.

Thank You
Gerry