Insert Document name in Pages

Is there a way to insert the document name as automatic text at the bottom of the first page in Pages? This was a simple "automatic text" script that Word has had for years. All of our documents are saved with names relating to what the document is and where it gets filed. Our paper filing/folder structure is pretty much identical to the folder structure of our file server. It is very convenient to have the name of the document printed at the bottom of the first page so that when it comes time to filing our hard copies, one knows exactly where to file it.
There must be a way to script this. Any help would be much appreciated. Thanks.

Automator isn't really the best solution to this. It's possible to do it with AppleScript, and granted, anything you can do in AppleScript can be put into an Automator workflow.
There seems to be three possible ways to mark the bottom of the document:
1) Insert carriage returns to position the very last paragraph (the name of the document) at the bottom. Drawback: if your document takes up all of the final page, then you'd have to create a blank page to accomodate the name. Also, determining the exact number of returns to insert isn't very easy.
2) Put the name in the footer. Drawback: footers appear on every page, not just the last. You could create a separate trailing section, but that has a blank-page issue similar to #1.
3) Create a text box at the bottom of the last page. Here's a little script that will do that.
As for triggering the script, the simplest way is probably to use the AppleScript utility to enable the system AppleScript menu, and put the script in the Pages scripts folder. Then it'll be available whenever you're running Pages.
<PRE>
-- Assumptions:
-- - units are inches
-- - pages are 8.5 x 11
property pageHeight : 11.0
property pageWidth : 8.5
tell document 1 of application "Pages"
set bottomMargin to bottom margin
set leftMargin to left margin
set theBottom to pageHeight - bottomMargin
-- Apparently, the new text box will be created on the page which is visible
reveal page (page count)
if path exists then
-- if you prefer Unix-style pathnames, then use
-- set docName to path
set docName to path as POSIX file as text
else
-- Might want to prompt user to save here.
-- otherwise, fall back on the document name, typically "untitled"
set docName to name
end if
make text box with properties {object text:docName ¬
, vertical position:theBottom, horizontal position:leftMargin ¬
, height:bottomMargin, width:(pageWidth - left margin - right margin)}
tell result
-- Some optional formatting
set alignment of object text to center
set italic of object text to true
set font size of object text to 18
set font name of object text to "Palatino"
end tell
end tell
</PRE>
Titanium PowerBook   Mac OS X (10.4.4)  

Similar Messages

  • Insert Document name at bottom of first page

    Is there a way to insert the document name as automatic text at the bottom of the first page? This was a simple "automatic text" script that Word has had for years. All of our documents are saved with names relating to what the document is and where it gets filed. Our paper folder structure is pretty much identical to the folder structure of our file server. It is very convenient to have the name of the document printed at the bottm of the first page so that when it comes time to filing our hard copies, one knows exactly where to file it.
    Any help would be much appreciated. Thanks.

    Hello all - I appreciate your responses. Brooks - you are correct. That is exactly what I am looking for. From a filing perspective, that is an amazingly useful feature. I am going to check into the scripting path. If Pages is indeed scriptable, I would be shocked if there is not a way to provide this feature.
    Gerry - you are correct about the saving part. In Word, you must save the document first, close it, and reopen it before printing in order for the file name to appear.
    Thanks again to everyone who replied.
    John

  • Insert "Last Name" in pages?

    I have created a letter and would like to personalize it in the printing process by inserting "last name" on each letter - from a numbers or CSV file that contains "last name" column.
    I'm stumped. It seems it only allows me to insert fields from my address book.
    So I opened up my address book and attempted to drop my file with addresses into a new directory but it wouldn't allow that kind of action.
    Can someone help me? Surely this is possible?

    I've read that chapter, several times - and I must be blind. It always requires that I use my address book (which does not contain the names/addresses I'm currently trying to use). I don't see anywhere I can select a numbers file/column instead.
    Can you point me to the area in the pages manual chapter 11 you are referring to?
    As I mentioned, none of the names/addresses I am trying to use are in my address - nor do I want to add them (unless I must - and would then put them into their own directory - I tried this and failed).
    I want to pull the "last name" from a numbers file and insert it into a letter, printing individual letters with "Dear Mr. <last name>, ........for 250 letters with a different name on each letter.

  • Is it possible to insert a 'Name' in Pages?

    I am creating a document in Pages, to replace an MS Word document I have previously used.
    It contains 2 tables with formulae based on one set of values. In Word I gave each value a 'name' and used it in the formulae to avoid multiple entires. So far, in Pages, it seems I can only use values in the same table, so I will have to enter the values twice. This makes the document look repetitive.
    Does anyone have the answer?
    Thanks in hope,
    Ken

    Hello Ken,
    Thank you for the details of the issue you are experiencing with creating a formula that references a data in a different table.   To reference the data in the different table, you will just need to click on the cell in the alternate table when building the formula:
    Add, subtract, multiply, or divide values
    You can create simple or complex arithmetic formulas to perform calculations on the values in your tables.
    Click the cell where you want the result to appear, then type the equal sign (=).The formula editor opens. Drag the left side of the formula editor to move it.
    Select a cell to use as the first argument in your formula, or type a value (for example, a number such as 0 or 5.20).
    Type an arithmetic operator (for example, +, -, *, or /), then select a cell to use as the next argument in your formula, or type a value.By default, + is inserted between cell references.
    Continue adding operators and arguments until your formula is complete, then press Return or click in the formula editor when you’re done.If you click , you exit the current cell without saving your changes.
    In step 2, just click the cell from the alternate table to reference that cell in your equation. 
    Calculate values using data in table cells
    http://help.apple.com/pages/mac/5.0/#/tana41710df7
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • Pages 5: Insert File Name

    How do I insert the File Name? How do I update an old File Name that was previously inserted?
    It's common practice to insert the document name in the footer of document, so people reading the document know what version the file was printed from. This was easily handled in the past version of Pages by going to the "Insert" menu and selecting "File Name". If you later modified a document, you could righ click on the inserted document name and the contextual menu would offer you the option to "Update File Name".
    Pages 5 seems to be missing this functionality. The software help instructions offer zero mention of Insert File Name.
    Has this been removed? If so, that's crazytown. If not, I'd sure appreciate being explained how to use this important feature.
    Thank you!

    Tell Apple and Apple's users by rating/reviewing Pages 5 in the App Store.
    Apple tries to clear out the bad reviews but with every new version they keep sinking lower and lower.
    In the Australian M.A.S. it is getting almost 3/4 saying they don't like it, with almost 3/5ths saying they hate it. Worse than the previous v5.0.
    I assume there were some who just quickly looked at it and didn't know what Apple had done. A few bad files and intractable problems later, and they are starting to wake up.
    The problem with the reviews is that mostly people do it on first impressions and they can't go back and correct their review in the light of experience, until the next version comes out.
    Peter

  • Documents opened with Pages 5.0 not opening with Pages 09

    I just downloaded the new version of Pages 5.0, and I really don't like it, it makes taking notes in class harder for me, and I wanted to go back to the previous version, but the documents that I opened with Pages 5.0 I cannot open them anymore with the previous version of Pages. They're not documents that I created with Pages 5.0, I created them with the previous version.
    So I wanted to know if anyone can help me.

    Once you open and save older documents in Pages v5, they are now in a new Apple document format that is incompatible with the prior version of Pages. Pages v5 does have the ability to save documents in Pages ’09 v4 document format. Keeping track of document names by Pages version becomes enigmatic without a purposeful naming convention.
    If you had Pages ’09 v4.n in /Applications, it is now in /Applications/iWork, and you can still use it instead of Pages v5.

  • Add name and page number to document

    Is there a built in way to add your name and page number to each page in a pages document?

    Hi Faynus! You can put it in the header or footer. Use Insert Page number in the menu. You need to have the insert point in the footer if you want it there. you can get the PAges User Guide by going to the menu > Help > Pages User Guide. YOu have the info about headers and footers there

  • Cannot open Pages documents that I've worked on.  I open a new document, work on it, then save and close it.  When I try to open the document again, I get the following message: The document "[name]" could not be opened. The file isn't in the correct form

    I cannot open Pages documents that I have worked on and saved.  When I try to reopen Pages documents that I've saved, I get the following
    message:
    "The document “[name of document]” could not be opened. The file isn’t in the correct format.
    The file might be corrupted, truncated, or in an unexpected format."
    I have downloaded the latest update to iWork, but that doesn't help.
    I use Mac OSX 10.6.7
    I am using Pages '09 version 4.0.5 (852)
    If anyone can help, I would greatly appreciate it.
    Best regards,
    New York Mac User

    A few general trouble shooting tips that may apply here:
    1. If you used Software Update to do the OS update(s) to reach 10.6.7, go to http://support.apple.com/downloads/ and download and apply the Mac OS v10.6.7 Combo Updater. The Combo Updater contains some fixes that were not included in the incremental updaters used by Software Update.
    1a. Check that you have the current version of Pages (and of the other iWork applications) installed. All three applications' current version numbers end in .0.5
    2. A common cause of malfunctioning applications is a corrupted preferences file (.plist file). Your Pages '09's plist is at yourname > Library > Preferences > com.apple.iWork.pages.plist
    Quit Pages, locate the file and Drag it to the Desktop (or to the Trash).
    Restart Pages and attempt to open one of the files.
    If all is well, Trash the plist file and empty the Trash.
    If there's no change, AND you've made changes to the Preferences that you wish to keep, drag the file back to its previous location, replacing any new one that has been created.
    Regards,
    Barry

  • Is there any way to insert a pop up calender and tick boxes into pages on the ipad? And if not if I do it on a mac will the document work on pages on the ipad?

    Is there any way to insert a pop up calender and tick boxes into pages on the ipad? And if not if I do it on a mac will the document work on pages on the ipad? I'm trying to set up a document with quick check boxes to tick and a date to choose rather than type? I know it possible to do it on pages on a mac but i haven't been able to find anything on the ipad to create such a thing, and I don't know if it will work on the ipad if I create it on the mac

    RGA,
    Unfortunately, I do not believe that it is possible for a DAQ board to generate an AI Start Trigger from an analog trigger, but not be triggered itself until it receives a digital trigger.
    Spencer S.

  • Pages returning error message "The document (name) couldn't be opened"

    Okay so here is my problem: I made a document in Pages the other day (a list of books I own) and after spending an hour or so on it I saved, closed Pages and went and did something else. The next day I came to open it again to add something and Pages came up with this message "The document (document naem) couldn't be opedned". That it, nothing else, no reason why or anything. I tried again and again, the same thing happednd. I tried to open it with Text Edit and got this error: "The document (document name) could not be opened. The file isn't in the correct format. The file might be corrupted, truncated, or in an unexpected format."
    Okay so something is wrong. The weird thing is I can quick look it, I can open it in Preview fine.
    So after trying everything I could think of I decided a few days later to just remake the document, I had all the information there so it was a bit easier this time. I started afresh. I frequently saved, quited and re opened just to make sure everything was okay, after a while I stopped doing this as it seemed everything was okay. I finished, saved and then tried to reopen it to make sure it was fine. It wouldn't open and returned the same error as before!!!
    This is utterly preplexing and extremely frustrating. I have no idea what might be causing this. If anyone can offer some help that would be great.
    Thanks in advance :-)

    Where are you saving the files to?
    Peter

  • How to insert documents first pagenumber on any page?

    Does anyone know how to insert the pagenumber from the first page in a indesign-document, on a page of choosing? I can only find how to add a document last-page as a number.
    Example:
    A document with page 10-20.
    On page 3, 4 or 13 I would like to have a footer that says "Document XYZ - Pages: 10-20".
    Any ideas?

    This is not intuitive,, but should work...
    On the first page add a small text frame anywhere and insert a fame break character. Now thread that frame to the one where you want to have your start page number, wherever that happens to be in the document. In this new frame enter a Special Character > Markers > Previous Page Marker.
    The down-side here is this is not a variable, so if you want to have more than one frame like this you need to set up each one the same way with its own linked frame on the first page. In sush a case I thnk it would be more practical to just enter the start page number manually, perhaps as a custom text variable that you can edit in one place if the start number needs to change.

  • When I try to open a document created in Pages, I get an error message saying "[Document Name" can't be opened."  I don't want to lose hours of work; has anyone else encountered this?

    When I try to open a document created in Pages, I get an error message saying "[Document Name" can't be opened."  I don't want to lose hours of work; has anyone else encountered this?

    A few general trouble shooting tips that may apply here:
    1. If you used Software Update to do the OS update(s) to reach 10.6.7, go to http://support.apple.com/downloads/ and download and apply the Mac OS v10.6.7 Combo Updater. The Combo Updater contains some fixes that were not included in the incremental updaters used by Software Update.
    1a. Check that you have the current version of Pages (and of the other iWork applications) installed. All three applications' current version numbers end in .0.5
    2. A common cause of malfunctioning applications is a corrupted preferences file (.plist file). Your Pages '09's plist is at yourname > Library > Preferences > com.apple.iWork.pages.plist
    Quit Pages, locate the file and Drag it to the Desktop (or to the Trash).
    Restart Pages and attempt to open one of the files.
    If all is well, Trash the plist file and empty the Trash.
    If there's no change, AND you've made changes to the Preferences that you wish to keep, drag the file back to its previous location, replacing any new one that has been created.
    Regards,
    Barry

  • Insert Fields From INSPECTOR DOCUMENT INFO into Pages Document

    I was able to do this since the DOS version of MS Word and would be rather surprised if there is no way to do it in Pages. Is there a way to insert "Document Info" about the present document into the present document?
    Am trying to work up my own template for manuscripts. I use the Document Info dialog and would like to have information like Author and Title dropped into the document via a field like can be done with Page Numbers.

    Bingo.
    I built a script inserting the infos extracted from the Infos dialog.
    --[SCRIPT insertdocumentinfos]
    Enregistrer le script en tant que Script ou Application : insertdocumentinfos.xxx
    déplacer le fichier ainsi créé dans le dossier
    <VolumeDeDémarrage>:Utilisateurs:<votreCompte>:Bibliothèque:Scripts:Applications:Pages:
    Il vous faudra peut-être créer le dossier Pages et peut-être même le dossier Applications.
    Définir dans un document Pages le point d’insertion des infos sur le document.
    Aller au menu Scripts , choisir Pages puis choisir “insertdocumentinfos”
    Le script extrait les infos de l’inspecteur Document > Infos et les insère dans le document.
    --=====
    L’aide du Finder explique:
    L’Utilitaire AppleScript permet d’activer le Menu des scripts :
    Ouvrez l’Utilitaire AppleScript situé dans le dossier Applications/AppleScript.
    Cochez la case “Afficher le menu des scripts dans la barre de menus”.
    Sous 10.6.x,
    aller dans le panneau “Général” du dialogue Préférences de l’Éditeur Applescript
    puis cocher la case “Afficher le menu des scripts dans la barre des menus”.
    --=====
    Save the script as a Script or an Application : insertdocumentinfos.xxx
    Move the newly created file into the folder:
    <startup Volume>:Users:<yourAccount>:Library:Scripts:Applications:Pages:
    Maybe you would have to create the folder Pages and even the folder Applications by yourself.
    Define, in a Pages document, the insertion point for the document's infos.
    Go to the Scripts Menu, choose Pages, then choose “insertdocumentinfos”
    The script extract the infos from IOnspector > Document > Infos and insert them in the document.
    --=====
    The Finder’s Help explains:
    To make the Script menu appear:
    Open the AppleScript utility located in Applications/AppleScript.
    Select the “Show Script Menu in menu bar” checkbox.
    Under 10.6.x,
    go to the General panel of AppleScript Editor’s Preferences dialog box
    and check the “Show Script menu in menu bar” option.
    --=====
    Yvan KOENIG (VALLAURIS, France)
    2011/03/09
    --=====
    property Document_loc : missing value
    --=====
    on run
    run script doyourduty
    end run
    --=====
    script doyourduty
    local inspecteur_actif, mon_auteur, mon_titre, mesmotsclef, mes_commentaires, mes_infos, selection_originelle
    my activateGUIscripting()
    Grab the localized title of the Document's inspector *)
    tell application "Pages" to set Document_loc to localized string "Document"
    tell application "Pages" to tell document 1
    -- set focus on the document
    end tell
    Grabs the title of the active inspector *)
    set inspecteur_actif to my getactiveinspector()
    if inspecteur_actif is {} then
    No inspector open, trigger Show Inspector to open one *)
    my selectMenu("Pages", 8, 15)
    Grabs its title *)
    set inspecteur_actif to my getactiveinspector()
    end if
    repeat
    if inspecteur_actif contains Document_loc then
    exit repeat
    else
    Open a new Inspector *)
    my selectMenu("Pages", 8, 16)
    Grabs its title *)
    set inspecteur_actif to my getactiveinspector()
    end if
    end repeat
    Now the Document Inspector is open, extract the infos
    set {mon_auteur, mon_titre, mesmotsclef, mes_commentaires} to my get_infos()
    set mes_infos to my recolle({mon_auteur, mon_titre, mesmotsclef, mes_commentaires}, tab)
    Insert the infos at the selection point
    tell application "Pages" to tell document 1
    set selection_originelle to contents of the selection
    set selection to (selection_originelle & mes_infos)
    end tell
    Clear the property because I dislike to store such item in the script *)
    set Document_loc to missing value
    end script
    --=====
    on recolle(l, d)
    local oTIDs, t
    set oTIDs to AppleScript's text item delimiters
    set AppleScript's text item delimiters to d
    set t to l as text
    set AppleScript's text item delimiters to oTIDs
    return t
    end recolle
    --=====
    on activateGUIscripting()
    (* to be sure than GUI scripting will be active *)
    tell application "System Events"
    if not (UI elements enabled) then set (UI elements enabled) to true
    end tell
    end activateGUIscripting
    --=====
    on getactiveinspector()
    local the_inspector
    tell application "Pages" to activate
    tell application "System Events" to tell application process "Pages"
    set the_inspector to title of every window whose subrole is "AXFloatingWindow"
    end tell
    return the_inspector
    end getactiveinspector
    --=====
    on get_infos()
    local l_auteur, le_titre, mots_clef, les_commentaires
    tell application "Pages" to activate
    tell application "System Events" to tell application process "Pages"
    tell (first UI element whose role is "AXTabGroup") of first group of (first window where subrole is "AXFloatingWindow" and title is Document_loc)
    tell (third UI element whose role is "AXRadioButton") to if value is 0 then click
    set {l_auteur, le_titre, mots_clef, les_commentaires} to value of every text field
    end tell
    end tell
    return {l_auteur, le_titre, mots_clef, les_commentaires}
    end get_infos
    --=====
    my selectMenu("Pages",5, 12)
    ==== Uses GUIscripting ====
    on selectMenu(theApp, mt, mi)
    tell application theApp
    activate
    tell application "System Events" to tell process theApp to tell menu bar 1 to ¬
    tell menu bar item mt to tell menu 1 to click menu item mi
    end tell -- application theApp
    end selectMenu
    --=====
    --[/SCRIPT]
    Yvan KOENIG (VALLAURIS, France) mercredi 9 mars 2011 22:14:43

  • Displaying Document Name With The Summary in a Single Column Using Document Library View.

    Hi All,
    I have a question that relates to SharePoint Document Library Views. I want to view the Documents name with the summary in a single column. Below image shows an example of it. I need this within a SharePoint Document Library. Also I want the height of the
    row to be increased more than the default height. I cannot figure it out how to do that? Could you someone help me to do this. I have inserted the Document Library as an App Part to the page. 
    So could you someone help me to solve this matter?
    Thanks and regards,
    Chiranthaka

    HI Chiranthaka,
    You can create DataView webpart using SPD and then modify the display template according to your need.
    http://deannaschneider.wordpress.com/2012/07/10/item-counts-dvwp-sp2010/
    Hope this will help to solve your problem.
    Best Regards,
    Brij K

  • Displaying Document Name & The Summary in a Single Column Using Document Library View

    Hi All,
    I have a question that relates to SharePoint Document Library Views. I want to view the Documents name with the summary in a single column. Below image shows an example of it. I need this within a SharePoint Document Library. Also I want the height of the row
    to be increased more than the default height. I cannot figure it out how to do that? Could you someone help me to do this. I have inserted the Document Library as an App Part to the page. 
    So could you someone help me to solve this matter?
    Thanks and regards,
    Chiranthaka

    HI Chiranthaka,
    You can create DataView webpart using SPD and then modify the display template according to your need.
    http://deannaschneider.wordpress.com/2012/07/10/item-counts-dvwp-sp2010/
    Hope this will help to solve your problem.
    Best Regards,
    Brij K

Maybe you are looking for