Pages v5 (all releases) was a complete rewrite — not based on Pages '09. Insert menu : Filename was never added to the application. There is no provision in the Pages v5 application to insert entire path either.
If you click on the document name in the title bar, a panel will open with the filename pre-selected, copy/paste that into your footer. There never was a capability within Pages '09 to insert a document path.
The following AppleScript will display a POSIX path to the currently opened document in Pages. It will handle three different Pages installation scenarios:
- Pages v5 only installed with open document
- Pages '09 only installed with open document
- Pages v5 and Pages '09 installed and one running with open document
Launch the Script Editor (Launchpad : Other : Script Editor). Copy/paste the following AppleScript into the Script Editor. All of the text will be purple (normal). Click the hammer icon to compile. Now the text is mixed colors (good). Two successive saves:
- File menu : Save… Filename: Pages_path. When you select Text from the FIle Format: selector, applescript will be appended to the filename. Check no other boxes, and Save into your Documents folder. This is the source only.
- File menu : Option key : Save As… Pages_path. From the File Format: selector, choose Application. A .app extension will be appended to the filename. Click Hide Extension box. Save to your Desktop. This is the clickable application.
- When you want an opened document's entire path, you click the Pages_path icon on your Desktop and a dialog will appear. Select, copy, and paste this filepath into your Pages document.
-- Pages_path - display the full path to the current document
-- path can be copied and pasted from the dialog into document
-- Handles three scenarios
-- 1) Pages v5 only
-- 2) Pages '09 only
-- 3) Pages '09 and Pages v5 both installed, but one running
set p9 to ((path to applications folder) as text) & "iWork '09:" & "Pages.app:"
if (version of application "Pages") is greater than "4.3" then
-- any release of Pages v5 open with document
tell application "Pages" to set document_path to POSIX path of ((front document's file) as text)
else if exists (p9) then
-- Pages '09 open with document
tell my application p9's front document to set document_path to path of it
else
-- OS X App Store Pages '09 only installed
tell application "Pages" to set document_path to front document's path
end if
display dialog "Current document path" & return & document_path as text
return