HOW TO

Create hyperlinks with relative pathnames

Last Published: April 25, 2020

Summary

Sometimes you may want to give a map that contains hyperlinks to someone who does not have access to your network resources. For example, when you want to distribute a CD of data and maps.

Just as you can save the map with relative pathnames to the data, you can also specify hyperlinks that refer to a location relative to the map.

To specify a path through a folder immediately below the map’s location in the file system, start the path with the folder name. Do not use a “\” or drive letter prefix.

To specify a path to a document in a sibling folder, start the path with “..\” and the folder name. For example, “..\graphics”, where the file is in “graphics” and the map is in “maps,” and both folders are in another folder.

This method of specifying relative paths works for dynamic hyperlinks and field-based hyperlinks.

Procedure

There are two methods for applying relative paths for field-based hyperlinks. Only the second works for dynamic hyperlinks.

  • Store the name of the linked documents in the table; for example, point_of_interest1.jpg. Then, set the Hyperlink base in the Map Properties dialog box to point to the folder where the document is stored; for example, links\graphics or ..\graphics.
    This works best when all the linked documents are stored in one location, and makes it easier to update the location if it changes. Specifying a hyperlink base path has no effect on dynamic hyperlinks.

    1. Create a text field in the table of the features from where you are hyperlinking to store the hyperlinked filenames.

    2. Add the hyperlinked filenames to the table.

    3. Right-click the layer in the table of contents and click Properties.

    4. Click the Display tab.

    5. Check the box to support hyperlinks and click the dropdown arrow to select the hyperlink field. Click OK.

    6. Click File and click Map Properties.

    7. Click the Hyperlink base text box and type the path to the hyperlinked documents using the path naming conventions mentioned above.

  • Follow the path naming conventions mentioned above to store the path and name of the document in the attribute field of the feature class or as dynamic hyperlinks; for example, ..\links\fieldnotes.txt or links\point_of_interest1.jpg. This allows more flexibility in organizing linked documents in different locations.

    1. Create a text field in the table of the features from where you are hyperlinking to store the hyperlinked file paths and names.

    2. Add the hyperlinked file paths and names to the table.

    3. Right-click the layer in the table of contents and click Properties.

    4. Click the Display tab.

    5. Check the box to support hyperlinks and click the dropdown arrow to select the hyperlink field. Click OK.

    Note:
    ..\folder\file.txt indicates that ArcMap should look one level up in the file system for a folder named folder, and find the file named file.txt.


    Note:
    folder\file.txt indicates that ArcMap should look for a folder in the file system at the same level that the map document is stored in, and find the file named file.txt.

Article ID:000004526

Software:
  • ArcMap 8 x

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic