Inserting filenames and pathnames into headers

According to Pages '08 help:
"Using Headers and Footers
Add headers and footers to give your documents page-by-page identity by showing the date and time, page number, or filename and pathname."
OK, I wish to add automatically updating filenames and pathnames in my headers.
Except there appears to be no way to do it?
Can you help?
Thanks

Hello
Here it is:
-- [SCRIPT]
tell application "Pages" to set u to path of document 1
(* "/Volumes/AluIce2504vide/autour d'iWork'08/documents_Pages/La cigale et la fourmi.pages" *)
set ky to "/Volumes/"
if u starts with ky then
set u to text (1 + (count of ky)) thru -1 of u
(* "AluIce2504vide/autour d'iWork'08/documents_Pages/La cigale et la fourmi.pages" *)
else
if character 2 of (0.5 as text) is "," then
error "Impossible de recoder le chemin" & return & "«" & u & "»" number 701
else
error "Can't parse the path" & return & "“" & u & "”" number 701
end if
end if
set u to POSIX path of u
(* "/AluIce2504vide:autour d'iWork'08:documents_Pages:La cigale et la fourmi.pages" *)
set u to text 2 thru -1 of u
set the clipboard to u
(* "AluIce2504vide:autour d'iWork'08:documents_Pages:La cigale et la fourmi.pages" *)
-- [/SCRIPT]
Save it as an application.
yourStartupDisk:Users:yourAccount:Library:Scripts:Applications:Pages:
maybe you will have to create the Pages folder and even the Applications one.
Select the document in which you want to paste its pathname
Execute the script from the System's Scripts menu
Paste where you want.
Yvan KOENIG (from FRANCE mercredi 28 novembre 2007 18:40:01)

Similar Messages

  • Inserting filename and page numbers into multiple PDF files?

    Have since seen this thread, BUT still interested in the syntax of the code
    to insert filename and page # into multiple files:
    http://forums.adobe.com/thread/951925?tstart=0
    Good Evening (GMT!)
    I have approx 100 PDFs with one or two pages in each, they are English translations
    of Russian language test certificates and the formatting/feel of the originals is lost in
    the translations. The only real link between the two sources is the "_RUS" and "_ENG"
    filename suffixes and the common leading filenames otherwise. Thus I need to maintain
    a record of the filename in any page I print off, should there be a need to refer back to
    the original if the translation is open to artistic licence.
    I have a script (below) that happily adds a page x/y and filename into the active file,
    what I would like is to be able to do this insertion into multiple files as defined by a
    portfolio or a selection via a select files dialogue box
    I am quite out of my depth now as my past skirmishes with JavaScript have set
    cookies and tweaked a few other browser doodads in webauthoring
    Any help most appreciated on this one...
    Kind Regards
    Dr B
    Southampton
    UK
    NB the filename inserted may be corrupted as a result of my last tweakings
    will sort that one out ASAP....
    ================================
    // SetRemoveFooter
    // Modified as marked
    // Menu item generation
    app.addSubMenu({ cName: "Footer",cUser: "Set/Remove Complex Footer", cParent: "File", nPos: 20 });
    app.addMenuItem({ cName: "Set Filename", cParent: "Footer", cExec: "SetFooter(1)"});
    app.addMenuItem({ cName: " -> Set Date .... centered", cParent: "Footer", cExec: "SetFooter(2)"});
    app.addMenuItem({ cName: " -> Set Date .... right", cParent: "Footer", cExec: "SetFooter(3)"});
    //add page x of y
    app.addMenuItem({ cName: "Set Page ", cParent: "Footer", cExec: "SetFooter(4)"});
    app.addMenuItem({ cName: "Set Both", cParent: "Footer", cExec: "SetFooter(5)"});
    app.addMenuItem({ cName: "-------------------------------", cParent: "Footer",cExec: "{}"});
    app.addMenuItem({ cName: "Remove Both", cParent: "Footer", cExec: "RemoveFooter(5)"});
    app.addMenuItem({ cName: "Remove Date Time (Filename)", cParent: "Footer", cExec: "RemoveFooter(1)"});
    app.addMenuItem({ cName: "Remove Page", cParent: "Footer", cExec: "RemoveFooter(4)"});
    //=====================================================================================
    //Set/remove Footer
    function SetFooter(ARG)
    var re = /.*\/|\.pdf$/ig;
    var FileNM = + this.path.replace(re,"")+".pdf";
    var Path = this.path;
    var AcDate = new Date();
    var AcDateFormat = "dd/mm/yyyy"
    var Box2Width = 100
    for (var p = 0; p < this.numPages; p++)
    var aRect = this.getPageBox("Crop",p);
    var TotWidth = aRect[2] - aRect[0]
    if (ARG<=3 || ARG==5)
    {var fd = this.addField("xftDate", "text", p, [30,15, TotWidth-30-30,30]);
    //print output?
    fd.value = util.printd(AcDateFormat, AcDate) + " (" + FileNM +")";
    // TEXT SIZE SETTING
    fd.textSize=12; fd.readonly = true;
    if (ARG==1){ fd.alignment="left" };
    if (ARG==2){ fd.alignment="center" };
    if (ARG==3){ fd.alignment="right" };
    if (ARG==4 || ARG==5)
    {var bStart=(TotWidth/2)-(Box2Width/2)
    var bEnd=((TotWidth/2)+(Box2Width/2))
    var fp = this.addField(String("xftPage"+p+1), "text", p, [bStart,30,bEnd,15]);
    // print output?
    fp.value = "Page: " + String(p+1)+ "/" + this.numPages;
    // TEXT SIZE SETTING
    fp.textSize=12; fp.readonly = true;
    fp.alignment="center";
    //==========================================================================
    function RemoveFooter(ARG)
    if (ARG<=3 || ARG==5) {var x = this.removeField("xftDate");}
    if (ARG==2 || ARG==5) {for (var p = 0; p < this.numPages; p++)
    var x = this.removeField(String("xftPage"+p+1)); }
    will

    Putting this in a batch file within the automation function of Acrobat
    delivers the goods, I need to investigate the formatting of the output to
    get them to line up, have taken the middle ground and gone for a central
    position for the page x/y text...... some lines are redundant
    Dr B
    ===========================================
    var re = /.*\/|\.pdf$/ig;
    var FileNM = this.path.replace(re,"")+".pdf";
    var Path = this.path;
    var AcDate = new Date();
    var AcDateFormat = "yyyy/mmm/dd  HH:MM"
    var Box2Width = 50
    for (var p = 0; p < this.numPages; p++)
    var aRect = this.getPageBox("Crop",p);
    var TotWidth = aRect[2] - aRect[0]
           var fd = this.addField("xftDate", "text", p, [30,15,
    TotWidth-30-30,30]);
           fd.value =  FileNM;
           fd.textSize=12; fd.readonly = true;
           fd.alignment="left";
    var bStart=(0);
    var bEnd=(TotWidth);
           var fp = this.addField(String("xftPage"p1), "text", p,
           fp.value = "Page: " + String(p1) "/" + this.numPages;
           fp.textSize=12;  fp.readonly = true;
           fp.alignment="center";

  • Insert filename and path?

    Hi,
    Can you insert the filename and path into a footer in a ID document same as you would with a Microsoft Word document?
    Thank you,
    Barb

    With CS3 use a text variable.
    Bob

  • Am unable to insert table and graphs into word document in labwindow/CVI? can any one help me ?

    Am unable to insert table and graphs into word document in labwindow/CVI? can any one help me ?

    Are you using the Word Report Generation instrument? You can find it in toolslib\activex\word\wordreport.fp under the CVI directory.
    The instrument comes with a sample project that shows how to include table and graphs in a Word document: see samples\activex\word\wordrpt.cws in the samples foder of your CVI installation.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • Inserting SOH and EOT into stream

    Hi all,
    I have a problem , I need to my socket client to bind and establish a socket connection to a remote server. Once the port has bounded the server expects a start of header, some text and end of text.
    The networking code work fine but I cant insert the SOH & EOT into the stream, every time I do it concatanates the string and converts my unicode values to string represenations. Heres the string that I am trying to send...
    byte SOH = 0x01;
    byte EOT = 0x04;
    String message = SOH + "803001HWDEMP447........" + EOT;
    outputstream.write(message.getBytes());The server accepts the connection and receives '01803001.......04", can anyone help in encoding this string?

    It's the conversion to and from a String. Don't convert the SOH and EOT into a String, just write them separately as bytes.
    byte SOH = 0x01;
    byte EOT = 0x04;
    OutputStream outputstream = new BufferedOutputStream(socket.getOutputStream());
    String message = "803001HWDEMP447........";
    outputstream.write(SOH);
    outputstream.write(message.getBytes());
    outputstream.write(EOT);
    outputstream.flush();

  • Inserting Date and Time into a date field

    Okay I am a bit of a Oracle newbie. I am trying to insert the following date and time into a date field and I don't know how to format the second part of the to_Date() function.
    Date/Time: 5/29/2003 7:58:45 PM
    Thanks,
    Branden

    I believe you would want
    to_date( '5/29/2003 7:58:45 PM', 'MM/DD/YYYY HH:MI:SS AM' )
    Note that tahiti.oracle.com has all of Oracle's documentation, including the very useful SQL & PL/SQL reference manuals, available for free.
    Justin

  • Insert Time and Date into Microsoft Access from Lookout

    I have an SQLExec running to export data to Microsoft Access - I would like to get A) A time stamp also to insert and B) A time stamp with out / and : -- I have found it impossible (from my limited knowledge) to do any of these things.
    Dose anyone have a very basic SQL Statement that might guide me on my way?
    Thanks!

    Oracle stores date and time in a DATE column; it all depends on how you have your insert statement. The last insert I specified the date and time
    ex.
    insert into test_date values(1,sysdate);
    insert into test_date values(2,sysdate-10.9);
    insert into test_date values(3,sysdate-8.098 );
    insert into test_date values(4,sysdate-5.11 );
    insert into test_date values(5, trunc(sysdate));
    INSERT into test_date values(6, to_date('01-JAN-2004 19:30', 'DD-MON-YYYY HH24:MI') );
    select * from test_date ;
    ID DDATE
      1 25-FEB-04
      3 17-FEB-04
      4 20-FEB-04
      5 25-FEB-04
      2 14-FEB-04
      6 01-JAN-04I don't see the time because the NLS_DATE_FORMAT is set to DD-MON-YY, but if I
    Select id, to_char( ddate , 'DD-MON-YYYY HH24:MI:SS AM') from test_date;
    ID TO_CHAR(DDATE,'DD-MO
    1 25-FEB-2004 06:57:02
    3 17-FEB-2004 04:37:05
    4 20-FEB-2004 04:20:02
    5 25-FEB-2004 00:00:00
    2 14-FEB-2004 09:24:50
    6 01-JAN-2004 19:30:00

  • Insert date and time into write to spreadsheet

    Easy question here
    I need save 4 arrays of data and insert the date and time that it was taken (LV 8.6)
    for example
    9/4/09 10:00:01 AM  4  6  7  2
    9/4/09 10:00:02 AM  4  6  7  2
    9/4/09 10:00:03 AM  4  6  7  2
    9/4/09 10:00:04 AM  4  6  7  2
    Any ideas, I can't wire the timestamp or date/time string right into the create array
    Thanks
    Chris
    Solved!
    Go to Solution.

    Ok
    the basic problem that I see is the the LabVIEW TimeStamp type is a cluster.  Converting it to a dbl gives you a value in seconds elapsed since 1904 Jan 1 12:00AM GMT and, your spreadsheet cannot interprate that (or display that) as a "TIME."   So, you want to convert it to a string (easy TS->String check the help for format options) BUT, you might want to pass all of your data as numbers into your spreadsheet so you can post-calculate or graph other outputs vs. TIME!  This little chunk of code .....
     converts a LV Timestamp to a number that Excel interperates as "the amount of days elapsed since 0 Jan 1900 @ 12:00AM LOCAL."  You will need to format the cell in Excel to display it as a date-time But it can be operated on and graphed against with only Excel's limitations (Excel followed the Lotus bug of erroneously assuming 1900 was a leap year, and Leap seconds are unrecognized)
    Enjoy!
    Message Edited by Jeff Bohrer on 08-06-2009 02:28 PM
    Jeff

  • Doubt in inserting Date and time into the table

    Hi i have created a table with two columns "Order_ID" and "Order_date" as
    create table test
    order_id integer,
    order_date date default sysdate
    Now i insert one row as
    insert into test(order_id) values(1);
    now i get the output as
    ORDER_ID ORDER_DAT
    1 05-JUN-12
    But i need to insert the current system time also into the Order_date column.
    How can i achieve this ???

    it works OK for me!
    bcm@bcm-laptop:~$ sqlplus user2/user2
    SQL*Plus: Release 11.2.0.1.0 Production on Mon Jun 4 20:19:57 2012
    Copyright (c) 1982, 2009, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    20:19:58 SQL> @test1
    20:20:01 SQL> create table test1
    20:20:01   2  (
    20:20:01   3  order_id integer,
    20:20:01   4  order_date date default sysdate
    20:20:01   5  );
    Table created.
    20:20:01 SQL>
    20:20:01 SQL> insert into test1(order_id) values(1);
    1 row created.
    20:20:01 SQL> select * from test1;
      ORDER_ID ORDER_DATE
          1 2012-06-04 20:20:01
    20:20:01 SQL>

  • Insert videos and photos into my movie

    Everytime I try to insert a video or photo into the movie I am creating it splits the photo that I am trying to place it next to or makes each clip shorter, I want to be able to insert the clips and photos and make everything else that is already there just push forward or back without loosing any of the clip length or splitting the clips that are already in the my movie? 

    You should be importing them to your computer regularly as you would with an y digital camera.
    Import photos and videos from your iPhone, iPad, or iPod ...

  • -Nokia 5530-Inserting contacts and numbers into a ...

    Hi I have been having some problems finding where to go to insert a number into a text message i want to send.All I see are the options to send an attachment (MMS) or a business card which sometimes cannot be opened by the person who receives it.
    Help please!
    Thank you

    Ewats,
    You have discovered one of the magic attributes of the Header Row Cells. Between now and when you have become more familiar with the special features of the shaded Header cells, it would be best to avoid them. See "Using a Table Header Row or Column" in Numbers Help.
    Jerry

  • Add filename and path into PDF-form

    Hello,
    I create different PDF-forms for our company with LiveCycle Designer 8.2.1 .
    Now I have to integrate the name of the form-file and its path automatically into the form. My idea is to place a text-field, I will give the type "calculated" in the value-tab of the object-palette. This Text-field should be filled with the file name and the path where it's stored in the background. I find these two values in the info-tab of the form-properties dialog-box. My questions is: How do I get these values, that I can place them via script into my text field?
    Can someone give me a hint? Thanks.

      To get the path ... event.target.path;
    To get the file name .... event.target.documentFileName;

  • Split filename and create folders with Powershell script ( --newbie user)

    I have a folder with 1000's of files. Each file varies in length; typically between 9-14 characters. Example:
    C:\workpics\1238955678.1
    C:\workpics\744556224.1
    C:\workpics\744556224.2
    C:\workpics\8445655996.1
    I would like to run a script to split the filename and separate into folders. The filename would then consist of 5 characters, the foldername would be the first characters remaining.
    C:\workpics\12389\55678.1
    C:\workpics\7445\56224.1
    C:\workpics\7445\56224.2
    C:\workpics\84456\55996.1
    Any assistance to create this Powershell script would be awesome. Thank you!!

    I have a folder with 1000's of files. Each file varies in length; typically between 9-14 characters. Example:
    C:\workpics\1238955678.1
    C:\workpics\744556224.1
    C:\workpics\744556224.2
    C:\workpics\8445655996.1
    I would like to run a script to split the filename and separate into folders. The filename would then consist of 5 characters, the foldername would be the first characters remaining.
    C:\workpics\12389\55678.1
    C:\workpics\7445\56224.1
    C:\workpics\7445\56224.2
    C:\workpics\84456\55996.1
    Any assistance to create this Powershell script would be awesome. Thank you!!
    Please reread your request.  It makes no sense.  Read each statement carefully and notice that the statements are in conflict.
    Start your scrip in PowerShell.  Look up things like how to list files and how to manage strings.  All of the information you need is here:
    http://technet.microsoft.com/en-us/scriptcenter/dd793612.aspx
    ¯\_(ツ)_/¯

  • JTable: HOW TO INSERT ROWS AND DATA?

    I have one JFrame on screen and inside of this i have a JTable, the question is how to insert rows and data into the JTable?

    [http://java.sun.com/docs/books/tutorial/uiswing/components/table.html]
    In future, please post Swing questions to the [Swing Forum.|http://forums.sun.com/forum.jspa?forumID=57]
    In short, your TableModel is probably a DefaultTableModel . Study its API.

  • Can't insert pic or table into CEWP on site page.

    I have a wiki where I have no problem inserting tables, pics, hyperlinks, and even editing the HTML to do all kinds of fun stuff.
    Today I try to insert an image into a CEWP on a site page and every time I paste in the URL and click OK nothing shows up.  Same thing happens with table.
    The best I have been able to with the CEWP on a regular site page is with HTML...I get a little black box with white x where the pic should be, but I do get the mouse over and I can get it to hyperlink when I click on it.
    What is going on here?  I can insert pics and tables into a list or announcements section if the column is using a rich text editor, but not on a regular site page.  I can only use the image web part which sucks because I cant make it hyperlink.
    Is it my version of Internet Explorer?  Did I make some change that broke SharePoint 2007?  Did someone else make a change to the site that screwed this up?  WAS I NEVER ABLE to do this and am just now realizing that CEWP have this limitation?
    -Bill

    Hi Bill,
    I believe for your case, creating picture library will solve your issue. Please refer the below reference URL which explains about recommended practice to use CEWP.
    http://www.nothingbutsharepoint.com/2009/10/30/adding-pictures-with-hyperlinks-in-sharepoint-aspx/
    if you need more information please let us know
    Sekar - Our life is short, so help others in their growth Whenever you see a reply and if you think is helpful, click
    Vote As Helpful And whenever you see a reply being an answer to the question of the thread, click
    Mark As Answer
    Why put the insert table or insert image into the CEWP editor if they can't be used?  Why not at least do the courtesy of grey them out so I do not spend two days thinking I am crazy or need to rebuild my entire SP sites etc...?
    Thank you for your response.
    Bill
    -Bill

Maybe you are looking for