Count the words in the NOTES...

With this script count the words, but I need to include the words of notes...

myDoc = app.activeDocument
T = 0
for (var j = 0; myDoc.stories.length > j; j ++)
{
T = myDoc.stories [j].words.length + T
}
Alert ("You have" T + "words in this document")

Thank you...

Oh, you use notes, notes

Then, this will do the job:

var docWordCount = app.activeDocument.stories.everyItem().words.length;
var docNoteWordCount = app.activeDocument.stories.everyItem().footnotes.everyItem().words.length;

var myDocWordCount = docWordCount + docNoteWordCount;

alert(myDocWordCount);

Hopefully it will work now.

--

tomaxxi

http://indisnip.WordPress.com/

Tags: InDesign

Similar Questions

  • Count the total number of specific words on each page

    I have a script that counts the number of times where the word 'Manager' is displayed on each page of a report.

    This is what is returned in the console after running the script:

    Count the number of managers 1 Page number 1

    Count the number of managers 2 Page number 1

    Count the number of managers 3 Page number 1

    Count the number of managers 4 Page number 1

    Count the number of managers 5 Page number 1

    Count the number of managers 1 Page number 2

    Count the number of managers 2 Page number 2

    Count the number of managers 3 Page number 2

    I need the console to report with only the total number of times that the word Manager appears on each page (once) and not iterate over each of them.

    Can someone please advise how this can be achieved?

    Script as follows:

    var this.numPages = NUMPAGES;

    for (var k = 0; k < numpages; k ++)
    {
    {
    numWords var = this.getPageNumWords (k);

    var number = 0;

    for (var i = 0; i < numWords; i ++)
    {
    var ckWord = this.getPageNthWord (k, i, true);
    var q = this.getPageNthWordQuads (k, i);
    Convert quads in the rotation by default user space
    Userspace used by links.
    m = (new Matrix2D).fromRotated(this,0);
    mInv = m.invert)
    r = mInv.transform (q)
    r = r.ToString)
    r = r.split(",");
    If (ckWord = "Manager")
    {
    Count ++;
    Console.println ("Count none managers" + count + "Number of Page" + (k + 1));
    }
    }
    }
    }

    Just move the statement outside the inner loop:

    var this.numPages = NUMPAGES;

    for (var k = 0; k)< numpages;="" k++)="">

    numWords var = this.getPageNumWords (k);

    var number = 0;

    for (var i = 0; i)< numwords;="" i++)="">

    var ckWord = this.getPageNthWord (k, i, true);

    var q = this.getPageNthWordQuads (k, i);

    If (ckWord = 'Manager') {}

    Count ++;

    }

    }

    Console.println ("Count none managers" + count + "Number of Page" + (k + 1));

    }

  • Is it possible to count the words in a field

    Is it possible to count the words in a field, and that the benefits of this county show upward in another area in LiveCycle? Like regular html Javascript code: If Yes, what is the correct syntax for the two different boxes? Thank you! Daria

    See the attached example.  It uses regular expressions, so a few caveats:

    1. my regex skills stink, so it cannot count words so perfectly that you like.  It is quite tolerant of special characters, but a string like "this & that" is taken into account 3 words, since the & is counted as a Word.  You can change the regular expression to fit your needs.

    2. as this example uses regular expressions in javascript, it will work well in Reader and Acrobat, but I don't think it will work for forms rendered on the server (e.g. exit).  For some reason regex support is missing in the Livecycle server javascript engine. or if it is there it does not work on my server.

    The script is located in the output: the data text box entry event.  You can type in (or paste) text in this text box and when you tab to the box, the number of words will be updated.  You can move the script in a different event on your form according to the when you counted words.

    I would like to know how it works for you.

  • The word "Bookmarks" does not appear on my bookmarks toolbar, so I can't access to my favorites

    The word "Bookmarks" does not appear on my bookmarks toolbar, so I can't access to my favorites

    The bookmarks toolbar gives you elements of 'context' for bookmarks.

    Do a right click in a white spot on the Navigation toolbar or the Tabstrip control.

  • Why did the counter works in MAX, but not of Labview?

    Please help, I've been away from Labview for more than 3 months and I'm pretty rusty...

    Last year, I configured successfully NI9401 to measure the period (in seconds) by counting the rising edges of my sensor signal.  Since then, I bought a new PC and loaded all my software inside, including the Labview VI that has worked successfully on the old computer.

    I can see the digital signal using MAX and test for the NI9401 Panel, then, I know that my son and my TTL signal is OK, but nothing except the below error when I try to run the attached VI, happens...  How can I say this VI to search for the signal on channel 14 and MOD3/CTR0?

    Thank you. I'm sure it's a small adjustment... it worked well a few months ago... do not know what the problem is now.

    Thank you

    Dave

    OK, now.  Solved the problem. The vi is fine, but some fragile son have been identified... worked in MAX but not in vi.  Now that the connections have been tightened, it works for both.  Sorry for the inconvenience.

    Dave

  • The right click "rotation" clock or function in a clockwise direction counter on my images does not work

    The right click "rotation" clock or function in a clockwise direction counter on my images does not work
    There is a range of adjustment that may be messed up?

    You are under Win XP and the display of photos with Windows Picture and Fax Viewer?

    Explain what you mean when you say "does not" you receive an error?

    The following command will force a reinstall of Windows Picture and Fax Viewer and can be worth a try:

    Reach... Start / run... and type
    (or copy and paste):

    regsvr32 /i shimgvw.dll

    (Yes, the space after the 2 and the)
    After the i is necessary)

    Press on... Come in...

    You should see a dialog box stating:
    DllRegisterServer and DllInstall in successful shimgvw.dll

  • An attachment in word pad in not readable, it shows only the symbols.

    original title: reading an attachment.

    An attachment in word pad in not readable, it shows only the symbols.

    Do you know what program created the attachment?  Name of the attachment should give this information.  For example, if the name ends with ".doc" or ".docx", it has been created by Microsoft Word .  If Microsoft Word is not installed on your computer, download and install the free Word Viewer program which can read the attachment. Boulder computer Maven
    Most Microsoft Valuable Professional

  • To combine files to PDF, a file has been replaced by another, the program automatically replaces the files? in other words, I did not choose, and it was merged into the document.

    When you combine files to PDF a single file has been replaced by another, can the program automatically replace files? in other words, I has not been chosen, and it has been merged in the document.

    Sorry, I don't have any ideas. This isn't a usual problem. It may be useful to repeat carefully to see if it happens again and check that the files contain what you expect.

  • Try to reinstall Adobe Photoshop Extended CS5 Win - have downloaded the file, but when I double click on the .exe to install file, I get and which words "Installer could not initialize - file not found" error message can someone help me?

    Try to reinstall Adobe Photoshop Extended CS5 Win - have downloaded the file, but when I double click on the .exe to install file, I get and which words "Installer could not initialize - file not found" error message can someone help me?

    Hi Rose

    Refer to the troubleshooting error messages | CS5, CS5.5 bootstrapper

    Installer [CS5.5] initialization failed. Please download Adobe Support Advisor to detect the problem.

    I hope this helps.

    Thank you

    Varun

  • count the words in a text widget

    Hello

    Is there a way I can count the number of words in a text box widget?  I realize that means counting the number of words in the attached variable - but can I do this?

    I tried to play with Javascript (which I know nothing)

    I put the following script in the script for a button pane, but nothing seems to happen!

    Test = Q5WidgetAnswer.Split (""). Length-1;

    document. Write (test);

    I want to check three words in a response, and if there are only two, or four, warns that there are three answers.

    Would be grateful for any help!

    After a lot of grief, I solved the problem.

    The code should be as follows:

    var objCP = document. Captivate;
    Var response = objCP.cpEIGetValue ('WidgetAnswer');
    Var words;

    if(Answer == '') {/ * empty response tests * /}
    Words = 0;
    Alert("Fred")

    }
    else {}

    Words = Answer.replace(/[^]/g,'').length + 1;    / * counts the number of places in response * /.

    }

    Where objCP can be any name that you want, and cpEISetValue and cpEIGetValue are special features of Captivate

    / * and * / add a comment

  • How can I keep alive the word in IndesignCS5 notes/memos

    Hello, I am at a loss regarding the loss of the notes to end 'live' who are alive in my word file, but after placing them in indesign cs5, they become dead, by that I mean that the endnote reference does not relate to his endnote or another. I was wondering have I missed an area of formatting or something. What I did is checked in the 'Microsoft Word Import Options' box my "preserve Styles and formatting from text and tables", and yet, they show always just as if it were numbers in exponent form, which is not what I want. I want to be able to do is when I go in my reference options in Indesign, I want to be able to restart page numbering in each section, modify the style etc., thanks if anyone can help.

    Eugene, are both your links in the last post on the same page... Was - this intentional?

    Peter Kahrel has a few scripts to deal with notes, including a reference to the script of end-notes, to http://www.kahrel.plus.com/indesign/footnotes.html. The OP can convert notes in the notes in Word, and then do the numbering restarts and so on in the IDS and finally convert back to endnotes. I don't know if it is more or less work than using references cross.

  • How adobe does not count the activations?

    How adobe does not count the activations of computer for this product.  I activated 2 computers, disabled 2 computers and then tried to activate another, only to be told that I got too many activations.  I tried to use my new Sony reader and was told by Sony that it was a question of adobe.  I talked to adobe to be told that it was a computer problem.  I have a new Christmas gift which is totally unusable!  We should be able to understand it!

    Please give me some help here!  It was a very expensive gift to have just sitting around.  I should have gotten the KINDLE!

    You should only withdraw the authorization if:

    -You give the computer

    or

    -You must decidied use a different AdobeID (and give up books associated with the old AdobeID).

    This is the last that can cause you a problem as Sony software

    I guess at this point you have submtted a case of taking in charge of web ( http://www.adobe.com/support/digitaleditions click on 'Submit a web case')

    Reset the number of activations is a relatively simple application, that our support team can support, and who should get so that you can re-enable the computers.

  • validation working is not to count the non-null fields

    I have six fields on the screen, I want to check that at least 3 of them are filled (3)...
    I created a validation as follows to count the non-null fields... but it's not working...
    Please help solve this problem or recommend a better way to do this...


    declare
    number of question_count;
    Start
    question_count: = 0;
    If: p1_t_question_1 is null then
    null;
    on the other
    question_count: =: question_count + 1;
    end if;
    If: p1_t_question_2 is null then
    null;
    on the other
    question_count: =: question_count + 1;
    end if;
    If: p1_t_question_3 is null then
    null;
    on the other
    question_count: =: question_count + 1;
    end if;
    If: p1_t_question_4 is null then
    null;
    on the other
    question_count: =: question_count + 1;
    end if;
    If: p1_t_question_6 is null then
    null;
    on the other
    question_count: =: question_count + 1;
    end if;
    If: p1_t_question_6 is null then
    null;
    on the other
    question_count: =: question_count + 1;
    end if;

    If: question_count > 2 then return false;
    otherwise returns true;
    end if;
    end;

    I'll take a look a bit.
    In the meantime, check if the code as

    If the trim (both '%' from: p1_question_with_nul') = 'null '.

    help

    Ok. Take a look now. I used the function TRIM as shown above and also changed the comparison for questions 3 text based on ' if: p1_question_with_text is null'

    Seems to work now

    CITY

    Published by: city has 23 October 2009 05:26

  • How to count the number of words in a string?

    It is only possible by counting the number of white spaces in the string?

    You can use the String.Split method to divide the string into an array using the character space as delimiter, and then check the length property of the resulting table.

  • To count the instances of the text in a group of cells?

    I am converting an Excel document. I used a table in Excel to count the number of times wherever a word of the text appeared in a group of cells. The table does not have in numbers. How do I do this in numbers?

    Hi Bruce,.

    Using the SUBSTITUTE function is a common way to do it. Could you post your Excel formula?

    SG

Maybe you are looking for