Applescript - how can I count the number of records in a Word data source?

I have written a script in AppleScript to open Word and then perform a mail merge from a data source and everything is working fine.
One thing I want to do but am struggling with is to return the number of records in the mail merge.
I am trying things like:
get last record of datasource of mydatasource
and also haven't been able to find anything in the AppleScript 2004 Word Reference Guide.
Can anyone help as I have been searching the web and trying things all day and I am sure it can't be difficult.
Thank you.

I don't think there is an automatic way to get a line count, but I don't have any problem just counting the lines on a page. Maybe some more information about what you are trying to do and why you can't do it would help someone to come up with a helpful suggestion.

Similar Messages

  • How do I count the number of records returned in the CMIS query

    How do I count the number of records returned in the query CMIS?
    SELECT COUNT(*) FROM ora:t:IDC:GlobalProfile WHERE ora:p:xRegionDefinition = \'RD_PROJETOS_EXCLUSIVOS\''}
    Euler Homero

    Hi Euler,
    interestingly enough, the reference guide for CMIS ( http://wiki.alfresco.com/wiki/CMIS_Query_Language ) that I found does not mention the COUNT function at all. On the other hand it states that: "The SELECT clause identifies which virtual columns to return in the result set. It can be either a comma-separated list of one or more queryNames of properties that are defined by queryable object types or * for all virtual columns."
    There are, however, some other posts like e.g. http://alfrescoshare.wordpress.com/2010/01/20/count-the-total-number-of-documents-in-alfresco-using-sql/ which state that they could make it working.
    Having asked in the WebCenter Portal forum, I assume that your content repository is WebCenter Content. The CMIS doc for the Content is available here: http://docs.oracle.com/cd/E23943_01/doc.1111/e15813.pdf (no COUNT there either). It does, however, mention explicitly that "CMIS queries return a Result Set where each Entry object will contain only the properties that were specified in the query.". This means your could rather investigate the Result Set. Note that there are also other means than CMIS how to get the requested result set (e.g. calling a search service directly via so-called RIDC).
    In the given context I am also interested what your use case is. OOTB CMIS in WebCenter Portal is used, for instance, in Content Presenter, where it is content rather than "parameters" what's displayed.

  • How can I count the number of unique cells?

    I have a column in my spreadsheet that looks like this:
    Date
    Items
    3/25
    Item A
    3/27
    Item A
    3/29
    Item A
    3/25
    Item A
    4/25
    Item B
    6/1
    Item B
    7/13
    Item B
    8/9
    Item B
    3/5
    Item C
    1/2
    Item C
    5/15
    Item D
    3/25
    Item D
    What I want is something that will list all the unique items that I have and count the number of times that Item shows up in my spreadsheet.  For example, the results should look like this:
    Item A: 3
    Item B: 4
    Item C: 2
    Item D: 2
    I thought for sure that I can do a chart in numbers and it would count the number of items but no, not so much.

    I apologize. When I pasted the table in Numbers running in French the values of column B were treated as dates.
    I leave the screenshot untouched because the contents of this column changes nothing to the calculations.
    In cell D2 of the main table, the formula is :
    =IF(ISBLANK(C),0,IF(COUNTIF($C$2:$C2,"="&$C2)=1,COUNTIF(C,"="&$C2)+(ROWS(A)-ROW( ))/100000,0))
    Apply Fill Down
    In cell A2 of table aux, the formula is :
    =IFERROR(LARGE(main :: D,ROW()-1),"")
    In cell B2 of table aux, the formula is :
    =IF(A>0,LOOKUP(A2,main :: D,main :: C),"")
    In cell C2 of table aux, the formula is :
    =INT(A)
    Apply Fill Down
    Yvan KOENIG (VALLAURIS, France) samedi 6 août 2011 23:33:10
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.0
    My iDisk is : <http://public.me.com/koenigyvan>
    Please : Search for questions similar to your own before submitting them to the community
    To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer !

  • How can I count the number of times a timed loop finished late?

    I am getting occasional timing errors in a timed loop under windows XP and would like to count the number of errors, but I can't find a simple software counter vi

    The timed loop has a terminal (boolean) to indicate if the previous iteration finished late. Just increment an integer shift register if this happens.
    The attached shows a very simple demo (LabVIEW 7.1).
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    LateCounter.vi ‏76 KB

  • How can I count the number of values in one column which answer to a condition in another column?

    I'm using Numbers 3.2 and would like to count the names in a column which satisfy a condition in a different column. There are 3 "streams" through which these names have come to me, and I would like to easily identify how many have come from each stream. Any help?

    Hi DirtyDawg,
    COUNTIF is your friend here.
    If your source is in column C and your streams are 1, 2 and 3:
    =COUNTIF(C,"=stream1")
    =COUNTIF(C,"=stream2")
    =COUNTIF(C,"=stream3")
    These need to be in a footer or header row or in a different column than C.
    hope this helps,
    quinn

  • How can I count the number of cans of liquids that I packed in Production?

    Hello everyone,
    I used the production module to produce a paint mixture. The final formulation/mixture is batch managed upon release. Now that the final mixture is completed, I used the final mixture again as a child item together with 1-liter cans and 1-gallon cans, also as child items, to form the final product, where the liquid will be packed depending on how many 1-liter cans and 1-gallon cans issued to production. Once completed, I could not see where I could track how many 1-liter cans I have, or how many 1-gallon can I have. Where should I see this information?
    Thank you,
    Derrick

    Hi,
    If I've understood the scenario correctly then
    1. You have a Production BOM for Liquid Paint BOM which you receive from production.
    2. You have BOM for 1 Ltr Can as parent item and Liquid Paint as Child Item this way you convert Liquid Paint FG into 1 Ltr Can.
    3. Similarly you do the same for 1 Gallon Can.
    Now,
    4. You should create Sales type BOM for Package with 1Ltr Can and 1 Gallon Can as Child items. So you can check the inventory of cans at any moment.
    In Administration>System Initialization>Document Settings, select "Price and Total for Parent Item Only" in the option "For a Sales BOM in Documents, Display".
    Regards,
    Sibasish

  • How can I count the number of pixels in a non-rectangular selection?

    I need to know the exact number of pixels that I select for a size comparison. It's a non-rectangular selection similar to a cloud.
    I'm using CS2 but could upgrade if needed.

    Thank You
    Michael D. Sutton
    (435) 723-3566
    (435) 720-2878
    [email protected]

  • How can i count the number of data patches in a numeric array

    Hi All

    BobLondn wrote:
    Can I build a 2d array where I can store on one column the index of each data patch and on the second column to store the length of elements of relevant data patch.
    Here's a quick example (LabVIEW 9.0) that stores the start index and length of all negative patches in a 2D array.
    (modified from this old code)
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    FindNegativeSegments.JPG ‏30 KB
    GetNegativeStretches.vi ‏16 KB
    FindNegativeSegmentsFP.JPG ‏52 KB

  • Count the number of records between two key values (BTREE)

    How can I count the number of keys between two values?
    I'm using python driver, and BTREE access method.
    ====>
    ideally what I want is to average a whole time-series data set (the intervals can change) to a given number of points. The keys are the time stamps and the values are the data that needs to be averaged. I need to count the number of records between two time stamps so that I can divide that number by the number of points i need, and average the data. What is the best way to do this?  Or should I just keep the intervals for the time stamp constant and use RECNO access method?
    Thank you
    (first post btw.. and why aren't there many people in stackoverflow who answer Berkeley DB questions?)

    BDB is an embedded db and it does not have any internal counters or statistics that you could grap to use for this.    You will need to do it manually.
    You can create a cursor, grap the records you want, each time you get the next record you bump a counter.
    If you are using RECNO, you can use a cursor to get the record number of the record (DB_GET_RECNO), and if all you data is in
    sequentail records with no missing records you can figure out the total count by take last rec # - initial rec # + 1 to get a total count.
    If you switch over to the SQL API, you can issue a SQL query to give you a count.  Select count(*) Where .......
    Since you have to grab the data anyway, then best may be to count records as you go along.
    thanks
    mike

  • How can I count the participants' number in TextChatApp? (using SharedObject, FMS)

    Hi all.
    How can I count participants' number?
    If the 3st user enter the room, the 3st user have to know that how many users are in the room.
    How do I know how many users are in the room?
    Thanks in advanced.
    Kevin.

    You have server side hooks for connections coming in or being closed (including here custom code for server disconnecting users for idle purposes).
    you need to keep track of the connections I don't remember now what FMS offers out of the box. Let's assume not much.
    When connection is coming in you can choose to accept or reject it. When you accept a connection you need to add it to your existing connections array or whatever data structure you use to keep track of them. Also you need to iterate to all connected users (clients) and call a custom method "userJoined()" on them to notify that a new user has joined.
    When a user leaves you need to remove the user from the collection and also notify that it left.
    on wowza you have stuff like :
    private HashSet();
    public void onConnect(IClient client, RequestFunction function,
                AMFDataList params) {
    public void onDisconnect(IClient client) {
    public void onConnectAccept(IClient client) {
        _connectedClients.add(client); 
        sendUserJoined();
    @param client
        public void onConnectReject(IClient client) {
             _connectedClients.remove(client); 
            sendUserLeft();
        public void sendUserJoined(String userName)
            Iterator it = _connectedClients.iterator();
            while (it.hasNext()) { 
                IClient each =  it.next();
                    each.call("userLeft", userName);
    FMS has similar hooks. This is simplified but you have a rough idea. You can call clients with no parameters and then is up to client so call back for updates to the server if interested. You need to implement "userJoined" and userLeft client side also.
    C

  • How can I limit the number of emails retained on my ipad air?

    How can I limit the number of emails that are retained on my iPad Air?  Because of legal requirements of a long-term project, I cannot permanently delete emails relating to that project from my ISP's mail server.  My gmail account contains over 17,000 emails and, upon setting up my new iPad, and updating to ios 7.1.1, I now have all 17,000+ emails taking up space.  I would like to limit the emails by count as I was able to do on my old iPad running ios 5.1.1 OR to retain them based on date range.  I have not found any instructions on the support discussions or general iPad blogs that allow me to do that.  Any way around this problem?
    I also miss the 5.1.1 mail search feature that allowed me to narrow the search by from/to/subject/all.  Does anyone know if that feature is available using some little-known ios 7.1.1 feature?
    Thanks for your help.

    jlfcba wrote:
    IOS 7.1.1 doesn't show a "days to sync" parameter anywhere in SETTINGS/Mail,Contacts,Calendars/ACCOUNTS/GMAIL Account/ GMAIL Acccount Info.  There is nothing in iTunes relating to such an option either.  So, it seems I'm back to square one.
    If you have a decent mail provider like Microsoft Hotmail or Outlook.com mail it does.
    If you have Gmail it does not.  Quite right. Gmail is rubbish.

  • Hii, Hii, Hii how can i see the number of sms i had sent from iphone5

    Hii, Hii, Hii how can i see the number of sms i had sent from iphone5????

    Log into your carriers web site to check or use app for that carrier.  The total count will be there.
    An example: for Verizon https://itunes.apple.com/us/app/my-verizon-mobile/id416023011?mt=8

  • How can i count the word in a cell.

    Dear Experts,
    i want to count the word in cell how can i do this ?
    Isthere any function ?
    plz give logic or command.

    You can ty :
    SQL> var text varchar2(50)
    SQL> exec :text := 'How do I count the number of words in my cell?'
    PL/SQL procedure successfully completed.
    SQL> select text,
      2         sum(case when substr(text,rownum,1)=' '
      3                       and substr(text,rownum-1,1)!=' '
      4                  then 1
      5                  else 0 end) nb_word
      6  from (select rownum,:text||' ' text,length(:text) ln from dual)
      7  connect by level <= ln+1
      8  group by text
      9  /
    TEXT
       NB_WORD
    How do I count the number of words in my cell?
            11
    SQL>  exec :text := 'How     do I count the number of words in my   cell?    '
    BEGIN :text := 'How     do I count the number of words in my   cell?    '; END;
    ERROR at line 1:
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    ORA-06512: at line 1
    SQL> var text varchar2(1000)
    SQL> exec :text := 'How     do I count the number of words in my   cell?    '
    PL/SQL procedure successfully completed.
    SQL> select text,
      2         sum(case when substr(text,rownum,1)=' '
      3                       and substr(text,rownum-1,1)!=' '
      4                  then 1
      5                  else 0 end) nb_word
      6  from (select rownum,:text||' ' text,length(:text) ln from dual)
      7  connect by level <= ln+1
      8  group by text
      9  /
    TEXT
       NB_WORD
    How     do I count the number of words in my   cell?
            11
    SQL> select * from v$version where rownum=1;
    BANNER
    Oracle9i Enterprise Edition Release 9.2.0.7.0 - Production
    SQL> Nicolas.
    Well, we can discuss about what limit a word : here space, but there is point, double-point, and so on... And about what is a word : do the punctuation is a word ?
    For example :
    "It's a word !"=>how many words are in this sentence ?
    http://en.wikipedia.org/wiki/Word
    Message was edited by:
    N. Gasparotto

  • HT2729 I have limited space on my new ipad. How can I limit the number of songs from my itunes on my imac from going to my ipad when I connect the two?

    I have limited space on my new ipad. How can I limit the number of songs from my itunes on my imac from going to my ipad when I connect the two?

    you can do this by keeping the external hard drive connected and doing the following
    -hold shift key down on computer while opening iTunes and a prompt will appear to choose a library
    -select choose library, iTunes should bring up your explorer windows where you can search for the external HD
    -after you find the external HD find the iTunes folder you just copied to it
    -after opening the iTunes folder look for the file that says iTunes library.itl or if you can't see that extenstion just look for a document looking thing in the iTunes folder that shows up as a database file
    -double click the database file and boom iTunes should load your library without having to copy it to the computer
    PS: do make sure that if you are going to do it this way, make sure that the external HD is connected at all times, because if you don't then you will get exclamation marks next to your iTunes songs
    double PS: if you are unsure how to find out if the iTunes library file is a database file just right click it and choose properties and under the type it should say database file
    hope this helps:)

  • Hi, how can I limit the number of emails I can see on my iPhone 5. Every time in delete one and older email gets added from my live.co.uk account (where I want to keep my 2500 emails) I just don't want many on my phone. Thanks

    Hi, how can I limit the number of emails I can see on my iPhone 5. Every time in delete one and older email gets added from my live.co.uk account (where I want to keep my 2500 emails) I just don't want many on my phone. Thanks

    You can't. Why on earth would you attempt to manage 2500 emails with setting up a folder structure or some means of doing so? Simply keeping them in an single inbox is not realistic, no matter what email client you use.

Maybe you are looking for

  • Where is the ENTER Button on the P1606dn when I am trying to manually feed envelopes?

    I had trouble trying to print envelopes using Microsoft Word running under Windows 7, I got an HP message saying to load the paper (envelope) then hit the ENTER button. Hitting the enter button on my keyboard did not get the intended results. Looking

  • IPad mini wifi issues

    hey guys. hopefully someone can help me out here. I have an iPad mini that I've had for a year now. Up until about 3 months ago everything was working fine,  now for some reason my iPad intermittently disconnects from wifi while streaming. a little a

  • Acrobat not responding when saving

    I use Adobe Acrobat X and Windows 7 (incase that makes a difference). Everytime I save it hangs and then it says "not responding" and if I leave it long enough it will recover and save. It happens everytime I save a file, doesn't matter how big or sm

  • JavaHelp : translate and to center

    Hi people! I'm using JavaHelp and I have two problems with it: 1) Translate... I try everything and until now I'm not able to translate... 2) To center... how can I center my JavaHelp screen? Please, I need help! Thanks, Renata

  • Posting of retirement/transfer not possible (error in the asset)

    Dear All, I have been trying to retire 3 assets by ABAVN. After I try to simulate the posting, it says: Posting of retirement/transfer not possible (error in the asset) Message No.465 Diagnosis An inconsistency was found for the asset 10 during the l