Paragraph number in pages

Can anyone tell me how to find the paragraph number of the insertion point in a Pages 09 document?
Thanks

Maybe like this:
*tell front document of application "Pages"*
*set C to character offset of (get selection)*
*set N to 0*
*repeat with P in (get character offset of paragraphs)*
*if P > C then exit repeat*
*set N to N + 1*
*end repeat*
N
*end tell*

Similar Messages

  • Index entry error: "The number of Page or Paragraph is not valid."

    I've done plenty of indexes in InDesign, and never seen this.
    After having worked on this index for several days, using plenty of ‘To next use of style’ references, many those references (but not all) have now suddenly reverted to current-page references. When I open the entry and try to change it, or even just click OK with current page selected, I get an error "The number of Page or Paragraph is not valid."
    Has anyone got any idea what causes this and how it can be cured?

    The Cost_of_sales_account & Sales_account as defined in the MTL_PARAMETERS are different from those in MTL_SYSTEM_ITEMS_B for the corresponding item. The values for these accounts in the interface tables are same as that in the MTL_SYSTEM_ITEMS_B table and hence not same as those defined in MTL_PARAMETERS.
    Actually we have a Custom trigger on the MTL_SYSTEM_ITEMS_B table which updates these accounts, once the item is created in the Master Organization.
    To verify this issue, I updated the accounts on the MTL_SYSTEM_ITEMS_INTERFACE table to match with that of MTL_PARAMETERS. Ran the 'Item Import', now those records are processed.
    Does this means that, the Interface is validating the cost_of_sales_account & sales_account to match with that of the 'Organization' ??.
    But we never had this issue in 11i. Is this a part of R12??

  • How to get paragraph number of selected text in ID CS4

    Hi,
    Can anybody help me how to get paragraph number of selected text in Indesign cs4.
    Thanks,
    Gopal

    Ah, I see -- thanks. Turns out that there's no difference in speed between texts.itemByRange(), characters.itemByRange(),and insertionPoints.itemByRange(). In a document with 170 pages of text, and with the cursor in the last paragraph, the second and third lines, below (and your function), give exactly the same result:
    t = app.selection[0];
    t.parentStory.texts.itemByRange (t.parentStory.insertionPoints[0], t).paragraphs.length;
    t.parentStory.characters.itemByRange (t.parentStory.characters[0], t).paragraphs.length;
    Peter

  • Can I Auto format the first paragraph on every page of a 20 page document?

    So I have a document that is basically just a numbered list of 200 entries.
    There are 10 entries per page, making it a 20 page document.
    Unfortunately, every so often I am given an additional entry to add, which invariaby is to the middle of the document, and not the end.
    What I'd like to do is if I were to add a new #20 to the document, the old #20 (now #21), being pushed to the next page, would then automatically be formatted using my "StyleA" paragraph style.
    I haven't been able to discover how to do this, which means, in the above example, I need to go to 18 pages and remove the "StyleA" paragraph formatting as in each case following the addition, it is now the second entry on the page. At the same time, I have to apply the "StyleA" paragraph formatting to each first entry of all subsequent pages. If I only had to do this once in a while, it wouldn't be an issue, but as this document is updated regularily, it is getting tedious.
    Nested styles doesn't seem to be an option, since i'm using Numbering which requires a paragraph break to differentiate between each line number, and nested styles seem to apply to every paragraph, unless i'm doing something wrong there.
    I hope this is enough to go on.
    Kraeg

    You are saying that the formatting is different for every 20th paragraph, reagardless of its content, and that it is aways going to be the first paragraph on a page?
    As long as you never deviate from the 20 paragraph cycle this is actually fairly easy to do, you jsut need 20 paragraph styles, 19 of which are based on each other and differ only in the style name. You then set the "next style" attribute to rotate through the list of styles, so the next style for #20 is #1 and the sequence starts over. Now just select the entire block of text from the point where you edited to the end and right-click on the style name for the irst paragraph in the selection, then from the context menu choose Apply <stylename> And Next Style.

  • How to get  the number of page which exists the change bar ?

    In FDK development, I want to find the number of page which exists the change bar.

    zhaopeng,
    You can get the page number by querying the FP_PageNum property of the FO_Page object:
    pageNum = F_ApiGetInt(docId, pageId, FP_PageNum);
    ...or you can use FP_PageNumString if you are using string page numbers.
    If you do not have the ID of the FO_Page object, you can get it from the paragraph ID using the following function, courtesy of Rick Quatro, posted to the Yahoo Framedev list. Send the paragraph (FO_Pgf) ID as oObj and it will return the page ID:
    F_ObjHandleT GetPage(F_ObjHandleT oDoc, F_ObjHandleT oObj)
    F_ObjHandleT oFrame = 0;
    IntT iObjType;
    F_ObjHandleT oRow, oCell;
    while(oObj)
    oFrame = oObj;
    iObjType = F_ApiGetObjectType(oDoc, oObj);
    switch(iObjType){
    case FO_SubCol:
    oObj = F_ApiGetId(oDoc, oObj, FP_ParentTextFrame);
    break;
    case FO_Tbl:
    oRow = F_ApiGetId(oDoc, oObj, FP_FirstRowInTbl);
    oCell = F_ApiGetId(oDoc, oRow, FP_FirstCellInRow);
    oObj = oCell;
    break;
    case FO_Row:
    oCell = F_ApiGetId(oDoc, oObj, FP_FirstCellInRow);
    oObj = oCell;
    break;
    case FO_Cell:
    // handle FO_Pgf case
    case FO_Pgf:
    // handle FO_AFrame case
    case FO_AFrame:
    oObj = F_ApiGetId(oDoc, oObj, FP_InTextFrame);
    break;
    // handle graphic object cases
    case FO_TextLine:
    case FO_TextFrame:
    case FO_UnanchoredFrame:
    case FO_Arc:
    case FO_Ellipse:
    case FO_Group:
    case FO_Inset:
    case FO_Line:
    case FO_Math:
    case FO_Polygon:
    case FO_Polyline:
    case FO_Rectangle:
    case FO_RoundRect:
    oObj = F_ApiGetId(oDoc, oObj, FP_FrameParent);
    break;
    default:
    // prevents loop if unknown object type is found.
    oObj = 0;
    break;
    if(oFrame){
    // Use FP_PageFramePage to get the page identifier of the object.
    return (F_ApiGetId(oDoc, oFrame, FP_PageFramePage));
    else
    return(0);
    Russ

  • How to calculate total number of pages in a script

    hi
    how to calculate total number of pages in a script

    Jyothsna,
    Date:-&sy-datum&
    Time:-&sy-timlo&
    Total No.of Pages:-&sapscript-formpages&
    Page No:-&PAGE&/&SAPSCRIPT-FORMPAGES&
    Give the above said lines in your text editor,and given the paragraph format.Better create one more window and give the above said lines in the text editor.
    K.Kiran.

  • Page numbers  and number of pages

    I am new to Indesign CS3. I have numerous articles to put on my web sites, using pdf. (I use Acrobat Professional 8). I am using ICS3 to layout each document, adding the text, then exporting to AP8 for 'tidying up'.
    As well as each page number, I want to put the total number of pages on a Master Page. I can do the page number itself but I also want ICS3 to enter the the total number of pages automatically. For example in a 6 page document:
    Page 1 of 6
    Page 2 of 6
    and so on
    How would I go about getting ICS3 to put the total number of pages, for example, 'of 6' on, please?
    Thank you

    I think the best thing for me to do is to first try the several presets that appear to be what I'm after and if so then not trouble you further. I shall do this week and let you know.
    Michael
    http://www.michaellever.co.uk/

  • Number of Page View is showing zero for Site web Analytics Reports

    Hi,
    We have enabled Site Web Analytics reports in our Site Collection but the Number of Page views is showing zero for all the dates. We have checked all the events to capture in Site Collection Audit settings, Reporting feature is also activated but still the
    count shows 0 for all the dates.
    There are other Site Collection that exists under that Web Application but they show the count for Number of Page views in Site.
    Any help would be appreciated.
    Regards,
    Vijay

    hi
    1-first check "Usage and Health Data Collection Proxy" is started, if not started:
    find usage proxy id with following command:
    Get-SPServiceApplicationProxy
    then start service with following command:
    $UsageApp = Get-SPServiceApplicationProxy | Where {$_.ID -eq "[usage proxy ID]"}
    $UsageApp.Provision()
    2-check following link:
    Popularity Trends populating 0 results
    yaşamak bir eylemdir

  • Page Number - Total Page number in Blocked ALV

    Hi Gurus,
      I need to print the page numbers like 1 of 5 in the ALV footer. Am able to print the current page number but am unable to print the total page number in the footer of the Blocked ALV. Can any one guide me how to display the total number of pages.
    Points will be awarded
    Thanks
    Ravi

    Hi,
    Please refer to the link below :
    http://www.sapdev.co.uk/reporting/alv/alvgrid_events.htm
    Thanks,
    Sri.

  • To find total number of pages in XML publisher

    1. Is there any method to find the total number of pages in BI or XML publisher.
    2. Is there any method to to repeat the column(Not rows) on every page.For eg you have table with two columns say "A" and "B" .I want to repeat this B in every page . And A should print only in first page.
    3. Is there any method to print a text say "ABC" only on first page footer based on condition.
    Thanks
    Wazid

    Exactly what my requirement is- In my template i have set header and footer page setup as "different first page'" and also printing the user text at the bottom of the last page using <?start@last-page-first:body?> <?end body?>.When i run the template, for multiple pages output user text is displaying at the bottom of the last page that is working fine but for single page output user text is not displaying at the bottom of the page because of the ""different first page'" header and footer.If you have any idea please suggest.

  • Why is my page count always 1 (regardless of number of pages)?

    I just created a new Numbers document. It has 3 pages.
    In the footer I display (page number) of (page count).
    I would expect to see "1 of 3", "2 of 3", "3 of 3".
    What I get is "1 of 1", "2 of 1", "3 of 1".
    What do I have to do to get the page count to count the number of pages?
    Thanks

    Hello. I was searching the boards today, because I was having this same issue.  I couldn't figure out why when I chose Insert, Page Count in the footer, it was always coming up "1" - Yet, Insert, Page Number would be correct.  This is what I would get in footer:
    Page 1 of 1, Page 2 of 1, Page 3 of 1, Page 4 of 1, etc.  Should have been: Page 1 of 5, etc.
    Not finding a "fix" here besides starting troubleshooting with creating a test User Account (which is okay), I decided to do some more troubleshooting first, and I discovered something.
    I found my fix.  I don't know if it's what was happening for you, but this fixed it for me.
    Insert the Page Count from the Menu in the footer.  Make sure the Inspector is open.  Go to the Sheet Section.  In the middle is a Page Options section.  For me, the "continue from previous sheet" was checked.  Instead, I checked the second option "Start at" and chose "1."  That worked for me.
    I started this spreadsheet from a csv document, but I tried starting one from a blank template and "continue..." was also selected.  Seems like it's the default?
    Hope this helps someone else who is having this issue.
    Have a great day!

  • Print number of pages with Report Generation toolkit

    I use the report generation toolkit and the Print Report.vi to print a table and some text extracted from a MS Access database. The result of this is a print out that takes up several pages.
    Now, on each page i want something like (Page x of y), and I do not want to buy more expensive NI packages for this simple thing. I know it should be possible since the Report Express vi can do it --- which for me is a useless vi.
    I do not consider it a nice solution to try and keep track of the number of pages myself by dividing the table into more tables and use the new page vi between each "page table". This I would not like to do since depending on paper size, font size, and length of text strings in each cell this will be virtually impossible.
    By moving into the Print Report.vi I've tried to see if I somehow can extract the info --- I've not found anything usefull but expect a workaround to possible.
    Any suggestions?
    Cheers,
    Martin

    Hi Skinny,
    There are some tokens you can use in the headers and footers of Standard Reports generated by the Report Generation VIs.  If you take a look at [LabVIEW]\examples\reports\TextReportExample.llb\Text Report Example.vi, you'll see that the right footer text of the report has the token <pagenofm>, which generates a footer of the form "1 of 10", to indicate page 1 out of 10 pages.  There's also another tag you can use, <page>, that just lists the page number itself without a total number of pages.  If you look at the help for the Set Report Header Text.vi or Set Report Footer Text.vi, you'll see a link in the help for all the different "tokens" you can use with the report header and footer.  Actually, now that I think about it, you can use these tokens anywhere in the report, including the body text.
    Good luck,
    -D
    Darren Nattinger, CLA
    LabVIEW Artisan and Nugget Penman

  • How can I change the number of pages in a spread?

    I imported a document that our PR department used to create in Quark into InDesign 5.5. They have it set up in four-page spreads. However, the document has always been printed with a coil binding with a large graphic on each left-hand page and text on the right page. I would like to convert to using two-page spreads. However, none of the places the InDesign help leads me give any indication of changing the number of pages per spread.
    My problem may be related to having imported from Quark, but if there's an easy way to change this, I'd appreciate hearing about it. Thanks!
    -Brian

    In the pages panel select the spreads then right-click and check Allow Selected Spreads to Shuffle and also Allow Documrnt pages to shuffle. If asked if you want to maintain the current page arrangement say no.

  • When I air print from my iPad, I can't limit the number of pages. It just says print and the number of copies and I end up with way more than I want. How do I set it to limit the pages?

    When I air print using FingerPrint from my ipad, it doesn't let me limit the number of pages, and I end up with more pages than I want. It asks if I want multiple copies, but it doesn't ask me number of pages, or which pages. Is there a way to do this?

    When you use an AirPrint compatible printer, you get this option for page range. You are using your computer as the server in order to print, so you probably have to set the range on the computer. While you can print from your printer with this app, I assume that it doesn't give you the same control that you get directly from the iPad when using an AirPrint printer.
    Read this from the FingerPrint support site. Selecting the page range would be part of the formatting of a print job.
    http://fingerprint-support.collobos.com/knowledgebase/articles/66972-i-can-t-for mat-the-print-job

  • How do you print two-sided in In Design when some sections have an odd number of pages?

    I'm new to In Design, and I'm trying to do something that seems pretty basic and having trouble figuring out how to do it, and I haven't found anything in the Adobe Forum or online that addresses this situation.
    I am working on a document that is broken into sections, with page numbering starting on Page 1 for each section.  I have mirror image layouts for the odd and even master pages - for example, the page number is on the left side on even pages and on the right side for odd pages, as you might generally expect to see on a two-sided printout, where in a book or a binder, the even pages are on the left and the odd pages are on the right.
    I'm printing the document from my computer onto a printer that supports two-sided printing.  I don't see any options in the File / Print window for two sided printing, so I set this option on the printer itself using the [Setup...] button at the bottom of the window.  This works - I am getting the printout on both sides of the sheets of paper.
    At the moment, the first section is 3 pages (two spreads, one with the first page, and one with the other two).  The next section starts with page number 1 on the third spread (one page) and then continues two pages per spread - all as expected.
    Here's the problem - the first page of the second section is printing on the back of the last sheet of first section, rather than starting on a new front-facing sheet - so when I put this in a binder, the odd pages are on the left and the even pages on the right.  Every time I hit the end of another section with an odd number of pages, it flips around again.
    There's a manual workaround I found - scan through the document and add a blank page to the end of every section that has an odd number of pages (and check "Print Blank Pages).  But I'd have to do this every time I print as I'm adding new pages, and add/delete blank pages as the number in each section changes.
    I can't believe that In Design doesn't provide a way to get this to work properly, as I'm sure many people have had this same situation, and I'm hoping that it's some simple thing that I just haven't been able to figure out...
    HELP!!! (thanks!  B^)

    Well, MS Word does something like this automatically - if you tell it to start a new section on an odd page, and if the section before it ends on an odd page, it will "skip" the even page number in between - and when it prints, it automatically spits out a blank page in between them, so that on a two-sided printer, the odd pages all print on the front of the paper (which is the right-facing sheet when they are put in a binder or book).
    InDesign shows the pages like this on the spreads (odd page numbers always on the right), so it is aware of the desired orientation, and I'd think it would provide a mechanism to ensure that they print out this way as well...

Maybe you are looking for

  • My ICal data does not show up on Subscribers Calendar

    Following all of the instructions how to get my ICal information to another Apple Computer (Macbook Pro) however when we access the Macbook Pro the data from my Calendar does not show up. Calendar is there, just the data does not make it across. Any

  • BELKIN F5U228

    Has anybody used one of these with a MacBook Pro to capture video from an old video camera? Belkin have been unable so far to tell me the compatibility situation.

  • Can't use bcp in SQL Server procedure

    I need to export data of sales between the last 4 years to a csv using a stored procedure, however the output of that just gives User name not provided, either use -U to provide the username or use -T for Trusted Connection, then it gives the possibl

  • BP Type is missing in WUI

    Hello Guru's We are not able to see the BP type in WUI for the Accounts , In back end we can see under Control data Tab->Control Parameters->BP type Here by requesting you to help how to proceded in this..... regards Sree

  • Storing 32-bit numbers in plc registers.

    I am using Labview 7.1 and DSC/OPC to communicate to an Allen Bradley SLC 5/05 over Ethernet. In my application, I desire to write and read part numbers ranging from 0-99999999 to/from the N registers of the PLC. Now since the N (Integer) registers o