Solved

Word document file is not opening the hyperlink pictures?

Posted on 2014-11-05
4
348 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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 Office Picture Manager is not included in Office 2013. This comes as a shock to users upgrading from earlier versions of Office, such as 2007 and 2010, where Picture Manager was included as a standard application. This article explains how…
Recently Microsoft released a brand new function called CONCAT. It's supposed to replace its predecessor CONCATENATE. But how does it work? And what's new? In this article, we take a closer look at all of this - we even included an exercise file for…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …

710 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