One way to 'link' to files, folders, etc. in iWork documents

Apr 17, '08 07:30:02AM

Contributed by: PizzaCake

iWork apps only allow hyperlinks to web pages, to create email messages, and to bookmarked pages in your iWork document. However, I find it useful to have links to other files in the iWork document, as it saves digging around the file system. I normally create links by selecting the file in the Finder then going to Services » TextEdit » New Window Containing Selection. This opens a TextEdit window with a link to the file, which I can then copy into any Cocoa based document. iWork apps, however, only paste this link as text.

To overcome this, I type in a line of text in the document (or in a comment) that specifies some combination of Spotlight type, attribute, and search text. I can then highlight this text and use a keyboard shortcut for the Spotlight Services menu item to bring up a Finder window containing matching items. This search can be very precise if required, and has the additional benefit that if the files are moved, they can still be found -- a traditional link would break if you moved the source file.

First set up a keyboard shortcut for Services » Spotlight. Go to System Preferences » Keyboard & Mouse » Keyboard Shortcuts, and add a keyboard shortcut as follows:

Now you need to set up your Spotlight search strings.

Here are some examples of Spotlight tags I might use. For each of these, I highlight the line of text, then press Shift-Command-F to run a Spotlight search using the selected operators:

This Apple document covers some of the ways to specify search criteria in 10.5, and includes a few useful examples, and this one shows you exactly what types of applications you can specify with the kind: modifier. There are lots of other attributes you can specify; see this hint for a long list.

[robg adds: I tried forcing Pages to create local links by specifying a file:/// URL, but Pages inserts an http:// at the front, so that didn't work. You could work around this by creating a local HTML page that links to the file you'd like to access, but that seems like a lot of work.]

Comments (1)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20080411072137949