Solved

Word document file is not opening the hyperlink pictures?

Posted on 2014-11-05
4
344 Views
Last Modified: 2014-11-05
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?
0
Comment
Question by:glaurin
  • 2
4 Comments
 
LVL 35

Accepted Solution

by:
Kimputer earned 500 total points
ID: 40423610
Your images are probably hard linked (for example: C:\Users\xxx\My Pictures\xxx.png)
After copying your files away, it's still looking at this very fixed location.
The problem wouldn't exist if it was stored as a relative link, but you have no control over that. So here's how to fix it (using relative location, the docx file has to be in the same location as the picture files).
First make sure you're saving in the docx file extension (you might need to install the fileformatconverter of Office Compatibility Pack if you haven't already).
After successfully saving it, rename the file from doc1.docx to doc1.zip
Now open the zip (preferable in 7-zip), and locate the file document.xml.rels in the folder word\_rels.
Now press F4 to edit the file. Since you have a lot of pictures, you will probably recognise the hard link. Use Find & Replace ALL to change it, so that it ends up as ..\picture.png (i.e. replace "C:\users\xxx\" with "..\")
Save the file, update the zip, then rename back to .docx
Open the word file and your pictures are there again. Everytime you copy it somewhere else, if you keep the docx file together with the pics in one folder, you will be able to see the pictures.
0
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 40423737
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

0
 
LVL 35

Expert Comment

by:Kimputer
ID: 40423836
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).
0
 

Author Closing Comment

by:glaurin
ID: 40424213
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
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Word is a program we have all encountered at some point, but very few of us have dug deep into its full scope of features, let alone customized it to suit our needs. Luckily making the ribbon (aka toolbar, first introduced in Word 2007) wo…
No matter the version of Windows you are using, you may have some problems with Windows Search running too slow or possibly not running at all. Before jumping into how you can solve this issue, just know there are many other viable alternative deskt…
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question