Preserving Hyperlink in Word
MICMA94 Posted messages 63 Registration date Status Member Last intervention -
Hello,
I have a Word file in which photos are linked from their storage directory, which is also the directory of the destination Word file.
When I copy this directory to an external hard drive, the photos display in the text when I open the file from the external hard drive. However, when I open the file under the same conditions from the external hard drive on another computer, the links no longer work, even though the .doc and the photos are in the same directory on the external hard drive.
How can I preserve the hyperlinks when transferring from one PC to another?
4 answers
-
Hello,
The issue arises from the fact that the hyperlink is absolute in the form file:///\E:\Tartempion\MesImages\Maphoto.jpg according to the drive letter assigned to the external disk.
Therefore, this link needs to be relative: file:///\Tartempion\MesImages\Maphoto.jpg
Start by disabling link updates in Word: Options - Advanced Options - General - Web Options:
in files, uncheck update links.The Word file must be saved once before incorporating the links; if this hasn’t been done, or for whatever reason the links are absolute, they need to be converted to relative links:
https://faqword.com/index.php/word/references/881-liens-hypertextes-absolus-et-relatifsIf both PCs belong to you, another approach is to assign the same drive letter to the disk on both PCs; you can use a constant property for this, such as the serial number of the disk, which remains fixed until it is formatted and can be obtained from the command line using VOL E:
You then declare in USBDLM, which runs on each PC, that what has the obtained serial number is called E: https://www.uwe-sieber.de/usbdlm_e.htmlThe other alternative is obviously to store these images on an online web space.
-
Thank you, I understand well—I suspected where the problem was.
But these maneuvers are quite complicated for me.
The simplest solution seems to be to "fool" the PC by assigning the same drive letter to my external hard drive. On source PC1 where my directory is stored under F:) the external drive appears as (G;) and the SD cards as (K:) whereas on destination PC2 it is (D:) and (E:) and the working disk (C:)
I managed to find the command line in Windows 11 (Windows key + R) but no matter how much I enter VOL D, E, G OR K OR USBDLM nothing happens except an error message
BUT BY GOING THROUGH (WINDOWS+X) IN DISK MANAGEMENT, I was able to assign the letter F to the SD card and thus reconstruct the path to the photos; So I can open the Word document with the photos that insert on PC2, but only from the SD card!! This will require me to work on this file always in the presence of the SD card. I have therefore only made it halfway.
Is there a simple solution to make the PC independent of the SD card? I am helped but not completely, I fear being brought back to the previous problem, where the source directory is no longer on a PC but on a memory card.
In any case, thank you for the explanations
-
Hello,
The problem arises from the fact that Windows assigns drive letters (except for the reserved letters A, B, and C) in the alphabetical order in which devices are connected, after assigning those for internal devices (built-in SD card readers, DVD burners...) and this arrangement is never the same from one PC to another.
Regarding the command line, there are 2 points after the drive letter: VOL E:
USBDLM is not a DOS command (which therefore does not recognize it), but as mentioned, it is a utility to download which, roughly speaking, installs a service that reads a configuration file that we will configure.
A syntax like the following will reserve the letter I: for the device whose serial number I entered provided by VOL I: no matter what happens (if I plug in a sufficient number of other devices, the PC will go from H to J while ignoring I):
[DriveLetters1] BusType1=USB BusType2=FireWire BusType3=SCSI VolumeSerial=22AC-746A Letter1=IForcing a drive letter like you did is risky for a removable drive, not at all certain of its retention upon disconnection-reconnection.
But if the external disk, which has since become an SD card, is not alternately connected to one or the other of the PCs, there is obviously no solution since this is where the links point; we won't do any better with non-absolute but relative links either, since in any case they will point to a drive whose letter may be variable, but which does not exist.
-
-
F:/ has become the letter of my card reader, all the other cards appear in turn in F:/, so there's no problem finding my links.
The previous PC had been sold to me already partitioned, with F::/ as the workspace. Should I have done the same on the new one, naming F:/ the workspace and leaving C;/ for system files and software? Then I think that copying the directory with the same path from one PC to another would have resolved the problem.
-
I don't know the partitioning of your disks; there is nothing preventing you from assigning other letters as long as they are not occupied.
Otherwise, it must be done in several steps using intermediate renaming, which is only possible if the moved letters do not have an impact (peripherals, data partitions), but not if it involves program partitions.
In any case, there is no solution to the link problem if the card is not always present in the working PC.
If playing with the already assigned letters is not enough, or even if it is, I would also create a specific partition for the data; it's always a sound precaution and it's not difficult using, for example, AOMEI Partition Assistant or Easeus Partition Master.
Except for movie fans, data is never cumbersome; a size of 20 GB is, for example, more than sufficient; you just need to assign the same letter to this partition on each machine, but then we will have to synchronize the data between each machine with a scheduled task if they are on a local network, or by copy-pasting via a USB flash drive otherwise.
-
-
Thank you,
I will try to partition my new PC by assigning the same letter as on the old one to the drive that will contain my data and work files. This way, the directory containing the linked files will retain the access paths. No problem with the old PC, as it will end up being discarded once everything is transferred; it no longer has a working screen, I'm viewing it on my TV!
In the future, if I create a document with links, I will work with relative links.
Best regards