Inserting a Relative Hyperlink

From NeoWiki

Jump to: navigation, search

In a NeoOffice document you can insert a hyperlink to another document in such a way that this link is preserved when both documents are moved together, even to another computer.
This way you can insert in a Writer, Calc or Impress document hyperlinks to files in any format created by NeoOffice: images, .html, .pdf files, etc.
Let us assume that you want to insert a hyperlink to the "myFile.html" into the myDocument.odt document. You have to proceed as follows:

  • In the NeoOffice menu, choose Preferences….
  • In the Load/Save section, under General make sure that the File system box in the Save URLs relative to section is checked.
  • Put myDocument.odt and myFile.html in the same folder, e.g. myFolder
  • Click in the location of myDocument.odt where you want to insert the link
  • Go to the Insert menu and choose the Hyperlink sub-menu or click on the Hyperlink icon in the toolbar (it's the icon which shows a "@")
  • In the Hyperlink dialog click on the Document icon if it's not already selected.
  • Click on the button on the right of the Path field in the Document section and browse to your myFile.html file. Select it and click Open
  • In the Further settings section, in the Form drop-down menu choose one of the two options Text or Button
  • If you choose Text you have just to enter the text which has to be clicked on to activate the link
  • Click Apply and close the Hyperlink window
  • If you choose Button you also have to disable the design mode. To do that go to the View menu, then to the Toolbars sub-menu and select Form Controls. In that toolbar click on the Design Mode On/Off icon.

Now you can move the myFolder folder where you want, including to another machine. The link still appears as an absolute one: file:///path/to/the/file, but it's automatically updated when you move the myFolder folder.
N.B. In order to maintain the link it's necessary that the file which contains the hyperlink and the target remain in the same folder.
You can insert a relative hyperlink in a cell of a spreadsheet in the same way..

This article in other languages: Français
Personal tools