Adding file name of the Document to stamp Script

Hello

I have the following script went into the properties of "custom calculation script" a custom stamp.

Event.source.source.documentFileName = Event.Value;

This script works very well and the place of the file name of the document on the stamp.

for example the document is called 6781202 Rev establishing and this appears on the stamp in the document.

However the revision and the file extension should not be on the stamp

Can anyone help to modify the script to place the first part of the name of the file only on the stamp

for example the modified script to display the file name of the document as 6781202.

This script should be used on multiple files and any help would be most appreciated.

Thank you very much.

Replace
Event.source.source.documentFileName = Event.Value;
with
firstWord = event.source.source.documentFileName.split("");
FirstWord = Event.Value [0];

Tags: Acrobat

Similar Questions

  • Enter the file name of the document a dynamic stamp is set.

    I need to get the name of the document file 'parent' a stamp is set to put in one of the textfields to stamps. That's what I was hoping would work inside custom stamps textfield calculation:

    Event.Value = app.activeDocs [0] .documentFileName;

    It's a no go. For some reason, activeDocs is always empty, despite the fact that I have 3 open PDF files. Anyone got any ideas on why it doesn't work? Get a better idea to do the same thing?

    Thanks for your help.

    This tutorial shows you how: http://acrobatusers.com/tutorials/2007/02/dynamic_stamp_secrets

  • How to see the file name of the document with the full path when you move mouse title bar?

    PS CS6 using, Windows 7 x 64.

    I was under the impression that when my mouse hovering over the title bar of the document, I would see a ToolTip showing the full file name, including the path.  This isn't the case and I wonder if there is a way to do it.  I know that I can click on file > save as, or Ctrl-Shift - S to see the full path, but hoving over the title bar would be easier.  (What I now see in the ToolTip is the name of the file, % magnification and layer that I selected.)  Basically, the ToolTip is showing just what is in the title without hovering bar.)

    Thank you!

    John

    AHA, I think it's a view tabbed vs thing windowed mode...

    I do not think that trying to change the way you manage your documents, well that--most people like one way or the other and stick with it.

    -Christmas

  • How to get the file name of the current active document in InDesign CS4?

    Hello

    If I open a document in the file-> open, I can get the file name of the document using IOpenedFileInfo-> GetOpenedFilePath().

    But, if I create a new document and run the file-> save as, GetOpenedFilePath is invalid back reference IdFichier.

    What is the right way to get the file name of the active document?

    Thank you

    VSP

    You can try this:

    IDatabse * db =: GetDatabase (theDoc);

    IdFichier * SYSIXCOL = db-> GetSysFile();

    PMString docName is SYSIXCOL-> GetFileName();.

    Good luck

  • File name of the active document

    Hello friends,

    Now that I managed to find quotes (special strings) in paragraphs, notes, tables and table notes - all with your generous help - I need to know the name of the file (path) of the current document (or book).

    All I've found is how to get the name of an element of the book file (finally that I need too, but later).

    How can I find the file name of the active document (which is not part of a book) and

    How can I find the file name of the current book?

    Thanks again for your help

    Klaus

    Friends,

    Suddenly, I found the answer (research in the reference of the oject for 'Filename' rather than 'file name' - 'path' in the FDK reference):

    alert ("Now processing book\n"+ app.ActiveBook.Name);
    alert ("Now processing document\n"+ app.ActiveDoc.Name);
    
  • adding multiple files *.csv while retaining the original file name in the first column

    Hi guys Cela made some time.

    I am trying to add several *.csv files while retaining the original file name in the first column, the real data set is about 40 cases.

    file a.csv contains:
    1, line an a.csv
    2, line 2 in a.csv

    file b.csv contains:
    1, line a b.csv
    2, line 2 in b.csv

    result output.csv is:

    I would like this:
    a.csv, 1, the line in a.csv
    a.csv, 2, line 2 in a.csv
    b.csv, 1, the line in b.csv
    b.csv, 2, line 2 in b.csv

    Any suggestions to speed up my hobbling attempts would be aprieciated

    Thank you

    -SS

    What you could do is given in attachment.

    Started with 2 files:

    a.csv

    copy of a.csv

    Both with data:

  • What is the correct syntax to a PDF form file name in the subject line of an e-mail. Doc Javascript?

    The name of the file is not part of any form field. The name of the file will be also unique whenever the form is used. I also want the name of the file that will be followed by the expression 'evidence' returned by the customer, as in:

    Topic: Proof of Papa Murphys SALEM 8 - 30.pdf returned by the customer

    Here is my existing script, but I need to know the syntax to get the PDF file name added in the subject line.

    this.mailDoc ({bUI: true, cTo: "[email protected]", bassujetti: "proof returned by the customer", CMSG: "attached is the signed evidence.}) Please send to the graphics dept '});

    I'm not very familiar with Javascript so have tried to reconstitute it.

    Unfortunately, there is only so much you can google to get a working solution, I would suggest that you get at least a little familiar with JavaScript (there are a lot of good tutorials and books available). If you want an introduction to Acrobat JavaScript, have a look here: Beginning JavaScript for Adobe Acrobat

    There is a property of the document object that returns the name of the file. You can read the property of Doc.documentFileName here: DC Acrobat SDK Documentation

    In the simplest implementation, you can use this to enter the file name in the subject line:

    this.mailDoc({bUI: true, cTo: "[email protected]", cSubject: this.documentFileName,  cMsg: "Attached is the signed proof. Please forward to the graphics dept"});
    

    If you want to add more information that just the file name, you will need to assemble your subject line by using variable elements and string constants. Something like this works:

    this.mailDoc({bUI: true, cTo: "[email protected]", cSubject: "The filename is " + this.documentFileName,  cMsg: "Attached is the signed proof. Please forward to the graphics dept"});
    
  • I want to create a file as in the documents folder.

    I want to create a file as in the documents folder. I do dog trainning and have lesson plans, I would like to keep in a folder in my document. I'm going upstairs with several so I want to be grouped. I'm what some mute computer but I follow directions. Laughing out loud

    Thank you

    Angela

    angelwings1956 wrote:
    > I want to create a file as in the documents folder. I have dog trainning and
    > have lesson plans, I would like to keep in a folder in my document. I'm going upstairs
    > with several so I want to be grouped. I am some what
    > stupid computer, but I follow directions well. Laughing out loud
    >
    > Thank you,
    >
    > Angela
    >
     
     
    Open Documents, right-click in the empty area of the preview pane and
    Select "New > file.» Name the new folder as you wish.
     
     
    --
     
    Bruce Chambers
     
    Help us help you:
    http://www.CatB.org/~ESR/FAQs/smart-questions.html
     
    http://support.Microsoft.com/default.aspx/KB/555375
     
    They who can give up liberty for a little temporary
    safety deserve neither liberty nor safety. ~ Benjamin Franklin
     
    A lot of people could die rather that thinking; in fact, most do. ~ Bertrand Russell
     
    The philosopher never killed the priests, while the priest was
    has killed a large number of philosophers.
    ~ Denis Diderot
     
  • If the name of the document contains, but NOT this

    I am trying to write the following script:

    If the name of the document contains 'before' and 'square', has.

    If the name of the document contains "recto" and NOT "square", do B.

    If the name of the document contains "back" and "square, do C.

    If the name of the document contains 'back' and 'square', NOT do D.

    Here is the code with the conditionals in the same order:

    for (i = 0; i < documents.length; i++){
        var curDoc = app.activeDocument = app.documents[i];
        var workingName = curDoc.name;
        if(workingName.match(/^*(front)*$/) != null && workingName.match(/^*(square)*$/) != null) {...} 
        if(workingName.match(/^*(front)*$/) != null && workingName.match(/^*(square)*$/) == null) {...} 
        if(workingName.match(/^*(back)*$/) != null && workingName.match(/^*(square)*$/) != null) {...} 
        if(workingName.match(/^*(back)*$/) != null && workingName.match(/^*(square)*$/) == null) {...} 
    }
    

    However, these ARE not return true and false as expected. As far as I know, taken individually, each regex match ground works.  I suspect that the problem lies in the & &, == null, and! = null shares, but am a bit of a loss.

    Specifically, a file named "before. TIF"is evaluated as TRUE for this condition:

    if(workingName.match(/^*(front)*$/) != null && workingName.match(/^*(square)*$/) != null) 
    

    If(workingName.match(/^*(front)*$/)! = null & & workingName.match(/^*(square)*$/)! = null) {...}

    It makes no sense, it does NOT contain the word "square" for the second half of this condition and thus the entire thing, must be set to false. Instead it's the treatment the & & (and) one | (or).

    Is (regexMatch! = null & & otherRegexMatch! = null) wrong approach?

    I tried with this and the tiff was not serious:

    #target photoshop
    for (i = 0; i < documents.length; i++){
        var curDoc = app.activeDocument = app.documents[i];
        var workingName = curDoc.name;  
    
        if(workingName.match(/(front)/g) && workingName.match(/(square)/g)) {alert(workingName +'   ' +1 +'   '+ workingName.match(/(front)/g) + '   '+workingName.match(/(square)/g) )}
        if(workingName.match(/(front)/g) && !workingName.match(/(square)/g)) {alert(workingName +'   ' +2 +'   '+ workingName.match(/(front)/g) + '   '+workingName.match(/(square)/g) )}
        if(workingName.match(/(back)/g) && workingName.match(/(square)/g)) {alert(workingName +'   ' +3)}
        if(workingName.match(/(back)/g) && !workingName.match(/(square)/g)) {alert(workingName +'   ' +4)}
        }
    
  • If the name of the document matches the regex, read actions

    I am often in a situation where, after completing work on several documents open photoshop, I want to play a specific action on some of them. The name of the file ALWAYS correspond to a model that should be easy enough to match with regex. Essentially:

    If the name of the document is 5 or 6 digits + 'F', read the actions.

    If the name of the document is 5 or 6 figures + "FX", read for the B shares.

    If the name of the document is 5 or 6 digits + 'B', read the actions.

    If the name of the document is 5 or 6 figures + "BX", read for the B shares.

    I believe that this requires a loop for to look through each open doc, then a if docName matches the regex, then play correct action.  But I can't put them all together and would very much help.

    Thank you!

    Hi squirpy,

    You can use a switch box or an if else clause. There is no difference.

    // be sure that action set with name actionSet exists
    // be sure that action1 in action set with name actionSet exists
    for(i=0; i
    

    Have fun

  • When you use the batch, record with the same file name in the same folder.

    I therefore about 500 pictures that needs to be cropped. I created the cropaction and added a "backup" function and close in action, because I want the photos to be saved with the same file name in the same folder...

    Now I want that it take its course. But no, I have to press ok to confirm the backup on each photo.

    Someone knows how to fix this?

    BR

    Robert

    I solved it.

    I forgot to check the box "override save under ' :)

  • Is there a change in FF8 for file names in the format UTF-8 sent as an attachment

    I send files with non-ASCII characters in their file names in the browser.

    I use the Content-Disposition: attachment; the file name * = "utf - 8" myfilename. "

    It worked well for FF7 and lower grades.

    In FF8, the file name is ignored (Linux and Windows).

    Is this a bug? Is there a better way to solve this problem?

    A good place to ask for advice on web development is the forum mozillaZine evangelism/Web development Standards.

    Aid to this forum are better informed on issues related to web development.

    You must register on mozillaZine forum site to post in this forum.

    See http://forums.mozillazine.org/viewforum.php?f=25

  • When I opened the window "save the Page under", the drop-down box file name indicates the files that have been saved a long time ago. It is not cleared by a function 'clear history' that I can find. How can I erase this?

    1. Question

    When I opened the window "save the Page under", the drop-down box file name indicates the files that have been saved a long time ago. It is not cleared by a function 'clear history' that I can find. How can I erase this?

    Hello.

    I think this is a related issue of Windows, because it is the Manager to save the windows file that we are talking about here (right?). You should contact Microsoft for help with this one, I think. You expect to be able to delete entries simply by touching delete on your keyboard when they are concentrated (that is how it goes for the removal of the form entries specific autocomplete in Firefox), but I have not tried.

    I'm sorry I can't be more helpful.

  • How to change a file name in the Photos? (no title)

    I know how to change the title of a photo in the Photos.  But I do not see how you change a file name.  Can anyone help?

    Photos will not change an imported file.  The original master image file is preserved. You can't even change the file name.

    To change the name of the file, export the Photos photo: file > export, and then specify a different file name in the export Panel.

    Re-import the renamed picture, then delete the first version you imported.

  • Can I change the file name of the .bar file

    Hello

    I built an application in Release for device mode.  He prodcued a filenamed bb10app.bar. Is it possible to change the file name to tell xyz.bar after it is built.  It is an application internal meaing only avaiable to our staff.  If I do not file name change how will I know what app it is. Given that bb10app.bar seems to be a default file for any application name.

    Thank you

    Joe

    Yes, you can change the file name of the file BAR, just keep the .bar extension and you shouldn't have any problems.

Maybe you are looking for

  • Signatures - cannot have .jpg and text; Why not?

    I just downloaded 38.0.1 Please don't tell me this - it does not solve my problem. https://support.Mozilla.org/en-us/KB/signatures I want this: http://www.freisco.com/zig2015.htmI created the file using FrontPage2000 as a html editor and posted onlin

  • Disabling hardware acceleration also live up to anti-aliasing of fonts

    As in the title. First screenshot shows what happens with hardware acceleration enabled, which seems better, second screenshot shows how it looks an alias with disabled acceleration with the race missing in some places on the very light fonts. Howeve

  • Home screen on network sharing

    Hello I installed a mac mini to run as a server for my iTunes library. Because it doesn't have a screen, I want to make it work using screen sharing. When the mac mini is connected via wifi, this works without a problem (using either a MacBook or an

  • Want 24: Audio channel for the HP Envy 24

    I have two fancy 24 moitors with Beats audio. Is it possible that I can do the audio comes out of the speakers of two monitors? I connected the cable to THE supplied their place but that did nothing. Is it possible to do?

  • "All delete and reinstall Windows.

    My laptop (a HP Envy model) supplied with Windows 8, when we bought it. I chose the option above as a way to get rid of all the programs that were prejudicial to the performance of my laptop; my laptop runs better now. However, when everything was fi