How to insert file path or file name in header/footer
How to insert file path or file name in header/footer?
iMac (27-inch, Late 2013), OS X Yosemite (10.10.5)
How to insert file path or file name in header/footer?
iMac (27-inch, Late 2013), OS X Yosemite (10.10.5)
In 2016 WORD
To add a path to your documents footer.
1. Click Field
2. Select Document Information
3. Select “FileName” Field
4. Click “Options…”
5. Select the “Field Specific Switches” tab in Field Options window
6. Select “\p” from “Switches”
7. Click “Add to Field”
8. Click “OK”
I haven't tried it, but you should be able follow VikingOSX's instruction (choice 3) in THIS DISCUSSION, using the AppleScript he's posted there with one edit to this line:
tell application "Pages"
Change to:
tell application "Numbers"
Regards,
Barry
In the Print Setup pane you can click one of the three header boxes or three footer boxes and enter the name or path.
The will be text, i.e. it won't update automatically if you change the name of the document the way you can do in Excel.
If you don't want to type out the name, you can have AppleScript get it for you and place it on your Mac's system clipboard, so you can just click in the box and command-v to paste.
tell application "Numbers" to tell front document
set the clipboard toname as text
end tell
If you want the whole path you can use this:
tell application "System Events" to tell process "Numbers"
window 1's attribute "AXDocument"'s value
end tell
set thePath to do shell script "x=" & result's quoted form & ¬
";x=${x/#file:\\/\\/};printf ${x//%/\\\\x}"
set the clipboard tothePath
Running these scripts is easy. Just copy-paste into Script Editor (in Applications > Utilities) and with your Numbers document open, just click the 'run' button. If you find you want to keep using them, the can easily be made into an item in your menu.
Testing results here:
You could also have a small AppleScript assemble the document and sheet name for pasting, etc.
SG
very helpful!
is there a way to set adding pathname to documents by default?
prucks wrote:
is there a way to set adding pathname to documents by default?
If your question is about Word then you are more likely to get an answer on the Microsoft support forums.
SG
How to insert file path or file name in header/footer