Add: Part One, Part Two.......and so on

I have a large document I want to add Part One, Part Two........... and so on to the beginning of each chapter title automatically, with a script, is this possible, and can someone (as I'm not so great a scripting) show me an example?
Many thanks

Hmmmm (thinking). It might boil down to this: search for your chapter titles (by style? I'll be assuming that!), insert 'part xx' before. Searching is no problem; inserting stuff is, because it messes up the 'found item' array. Let's start at the end, shall we. This code is not tested!
var numerals = [ "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten", "Eleven", "Twelve", "Thirteen" ]; (etc.)
app.findTextPreferences = NothingEnum.nothing;
app.findTextPreferences.appliedParagraphStyle = "ChapterTitle"; // [!! YOUR STYLE NAME HERE !!]
allFoundItems = app.activeDocument.findText(true);
// This returns the items in REVERSE ORDER :-)
if (allFoundItems.length > numerals.length)
  alert ("We're gonna need a bigger boat");
  exit(0);
for (occurrence=0; occurrence<allFoundItems.length; occurrence++)
  allFoundItems[occurrence].insertionPoints[-1].contents = "Part "+numerals[allFoundItems.length-occurrence-1]+"\r";
The 'allFoundItems' array is in reverse order (as requested by findText), so the numbers should be inserted last-to-first. Let me know how that worked out

Similar Messages

  • My iMac cannot load web pages. It will load one or two and then freeze up. I have rebooted everything.

    I cannot get Safari to work properly. Initially, it would open everything but yahoo mail, so I was using Google Chrome to open that, but now that doesn't work either, I have checked for software updates, rebooted the Mac, my router and modem to no avail. And now, it doesn't want to open much of anything. My I pad is working fine, which leads me to think it is a problem with the Mac, not the router or modem. I am using most recent version of OSX 10.7.2

    Welcome to Apple Discussions!
    OSX apps are fussy about paths. I generally leave the apps exactly where the installer puts them. You could try moving them back into a new folder named iWork '06 (this name must be exact). If the app still does not run correctly I would delete the whole app including the files in the receipts folder and preferences and reinstall.
    Kurt

  • I have two companies sending me indesign documents. One opens up and the dictionary is set to English. The other file opens at is in Hebrew, Not sure how to fix the Hebrew part and whether or not the fualt lies at my end or at the other end

    I have two companies sending me indesign documents. One opens up and the dictionary is set to English. The other file opens at is in Hebrew, Not sure how to fix the Hebrew part and whether or not the fault lies at my end or at the other end

    If only the language is Hebrew, you should correct it in the Paragraph and Character Styles.
    But in such a case I would expect more problems.
    If you are a creative cloud subscriber you should additionally install the InDesign version, English with Hebrew support:
    Go to the preferences of you CC.app. It is found behind the Gear Symbols on the top right.
    When the preferences open, go to the Apps section.
    Change the App Language to English with Hebrew support.
    Now you can install it. It will install on the very same place where your InDesign program is found some additional plugins, which will give you access to Hebrew functionality, like RTL text. Otherwise you will inherit in the document (and where you copy and paste it from such a document into another one). But now you can change or repair problems.
    Now repeatstep 1 + 2, but you need not to install your own language again. InDesign will now, when started, run in the language of your OS (when you have it installed in that language) but with more functionality to handle problems with Hebrew documents.
    The same steps you would have to do with Arabic or Asian documents. These languages will also add more plugins. But keep it limitted to those language you need. I have installed it that way, because I get sometime documen where the text flows the wrong direction or the numbers come up in Farsi digit, not in Arabic digits. For such purposes I need versions in languages I don’t understand myself.

  • I have one home computer and our household has 2 iphones. I am signed up on itunes and now my husband would like to have an account with itunes as well. Can there be two accounts for 2 users for itunes on one home computer? How do I add another account ?

    I have one home computer and our household has 2 iphones. I am signed up on itunes and now my husband would like to have an account with itunes as well. Can there be two accounts for 2 users for itunes on one home computer? How do I add another account ?

    Have a read here...
    https://discussions.apple.com/message/18409815?ac_cid=ha
    And See Here...
    How to Use Multiple iDevices with One Computer

  • I have had Adobe XI for about two years and My harddrive just crashed. My backups were part of the failure so I can't get it back. I purchased it from a third part supplier and it was a download. I need to find out how to get it restored. I can send scree

    I have had Adobe XI for about two years and My harddrive just crashed. My backups were part of the failure so I can't get it back. I purchased it from a third part supplier and it was a download. I need to find out how to get it restored. I can send screen shots of all of the drive location where the drive is still good and I can see my Adobe Acrobat pro information, but the download itself is missing. NEXT STEP?

    If you are talking about Reader (you did post in the Reader forum), then just download http://get.adobe.com/reader/enterprise. However Reader is free not purchasable. You can download a trial then install using your serial number, which if you didn’t register or write down somewhere you will be out of luck to track down.
    Download a free trial or buy Adobe products | Adobe downloads

  • Is it possible to add a shortcut to one or two very select websites to the navigational toolbar for convenient, one-click entry (i.e., which toolbar currently has buttons for viewing bookmarks and browsing history)?

    I would just like to be able to click once to get to one or two very important websites, just as I can now click once to show my viewing history (or scrapbook) in the sidebar.

    That's what the bookmarks toolbar is for.
    But putting single bookmarks there can fill it up quickly. Rather than a keyboard shortcut you can create a '''keyword shortcut''' for the bookmark, and that bookmark can be anywhere and out of sight. I keep all (most) of my keyword bookmarks in one folder on my bookmarks toolbar with the name beginning with the keyword. Here is an example, next door neighbor liked it for their netbook used at TV
    '''Name:''' tv: TV Listings - Find Local TV Shows and Movie Schedules - Listings Grid | TVGuide.com
    '''Location:''' http://www.tvguide.com/Listings/
    '''Keyword:''' tv:
    '''Description:''' PPP (User must be custom TV choices at Yahoo/TVGuide), start with zipcode (uncheck timezone), uses cookies, do for not logged in and for logged in. Must be logged in to pick your favorite channels to reduce list size.
    '''Firefox Keyword Shortcuts'''
    *http://dmcritchie.mvps.org/firefox/kws.htm
    Bookmarks toolbar styling'''
    * Stylish :: Add-ons for Firefox<br>https://addons.mozilla.org/en-US/firefox/addon/stylish/
    * '''Bookmarks Toolbar Fx4 Blue/Folders, Red/Bookmarks''' - Themes and Skins for Browser - userstyles.org<br>http://userstyles.org/styles/46947/bookmarks-toolbar-fx4-blue-folders-red-bookmarks

  • Did not found advanced web part gallery and options in web part categories when tried to add a webpart in webpart page

    HI
    I created a web part page and try to add a web part
    in web part categories  i did not found advanced web part gallery and options 
    how i  found this optino
    adil

    Hi,
    In SharePoint 2010, the “Advanced Web Part Gallery and Options” is gone, you can add web part into page in SharePoint 2010 like this:
    Add, move, minimize, or delete a Web Part from a page
    https://support.office.com/en-ca/article/Add-move-minimize-or-delete-a-Web-Part-from-a-page-d5d533c3-db66-4105-a5e8-8ae15fb60087
    Best regards,
    Patrick
    Patrick Liang
    TechNet Community Support

  • Hi I am hoping to add my 2 TB time capsule to my existing wireless network using cisco dpq 3925 modem. I have two mbp one running Yosemite and the other os 10.7.5

    I have a time capsule 2TB model 1409. I would like to connect it to my existing wireless network (using a cisco DPQ 3925 modem). I have two mac book pro one running Yosemite and the other OS 10.7.5. The best I can do is to connect the TC to the Modem via ethernet. Have one of my MBP connect to the time capsule using a ethernet cable and have the TB set to bridge mode. In this configuration, both mbp and the iPad can detect the TC but when I try to connect it to the wireless network, using the same network name and password, the light flashes amber and I cannot detect the time capsule again.

    Correct..
    The best I can do is to connect the TC to the Modem via ethernet.
    The TC does not connect to non-apple routers by wireless.. well. It is possible but so poor a method that Apple seem to have eliminated it in the setup wizard.. I would take that as a good thing..
    If you cannot use ethernet you have two choices..
    Use another apple router that is plugged into the Cable modem.. eg a second hand Extreme Gen5 or the latest Express.. the Extreme is both cheaper and better.
    Or you can use a set of EOP (homeplug) adapters.. but they cannot be guaranteed to work so you should buy from a place that allows returns.

  • SharePoint 2013 and IE 11 issue - While creating a Web Part Page and Editing Web Part Properties

    I tried to edit a Web Part in SharePoint 2013 using IE 11 but I did not see the Edit Eeb Part dropdown menu at the top-right corner of the web part. Then I tried to create a Web Part page and I get the following error.
    Cannot create a Web Part Page with the current browser. Browsers that support the creation of Web Part Pages include Microsoft Internet Explorer 7.0 or later, Mozilla Firefox 3.0 or later, and Apple Safari 3.0 or later
    Strange !!! My web browser is IE 11.
    I tried the above two tasks in Google Chrome and worked fine.
    Solution:
    I added the site url to local intranet zone in IE 11 and I am now able to add Web Part Page and Edit Web Part in IE 11.
    imd.net

    Hi - One more solution is to add SharePoint site to compatibility group:
    http://blog.fpweb.net/sharepoint-internet-explorer-compatibility-issues-with-video/#.VAaZSPmSyy4
    -prs

  • Report to find a material by a mfr part number and old material number

    Hi,
    Is there any standard report to find a material by a mfr part number and old material number ?
    For the moment, we are using MM03 to search articles by these selection criterion.
    Thanks,
    Julien Girard

    Hi
    As there is no stsndard report use the SQVI to find out the details, It is very simple , please follwo the below steps.
    Use Txn SQVI, enter the Quick view field say- ZMNFR and click the  create button, Enter the title in the next screen i.e Report name- Say - Manufacturer's Part No. Details, in the same screen you need to enter  MARA  for the data from table/database view, please leave the 1. data source as Table only and the radio button as Basis mode only.  Click the tick mark , you will go to the next screen,
    You will notice Quick viewer Intial screen
    Open the node general material data
    Select the Buttons besides the fields MARA-MATNR for material number, MARA-MFRPN for manufacturers part number, and MARA-BISMT for old material number. You can include any other field if you wish to have in your output. You will notice two check boxes against each field, one is for input screen field and the other is for outputf field. But currently you do not bother about and select both the check boxes or any other field you wish to have as input and output as well. Once selected all the fields afer clicking the check boxes save the total arrangement. and then in the same screen use the execute button or use F8 to find out your report input screen.
    Now enter the Material number for which you wish to know other two details in the report and execute again you will find the report output.
    Please ensure that you are maintaining both the details in material master basic data1 and purchasing  view if you wish to get  out output
    Best regards
    SAM
    Edited by: samuel mendis on Apr 8, 2009 6:52 AM

  • Part payment and residual payment

    hi sap gurus
    i need the diff between part payment and residual payment, and what is the part payment and what is residual payment

    Hi
    Reply  for difference between partial Payment and residual payment
    Assumption: An expense of Rs.20000 is accounted.
    Example of partial Payment
    Step one. When the Vendor invoice posted
    Exp           Dr     20000
          Vendor      Cr     20000     
    2nd step: At the time of payment If Partial payment method adopted.
                   Vendor a/c              Dr  10000
            Bank Sub Account  Cr  10000
    Note :If you will  go for vendor balance  display , it will show both Debit and Credit balance  in the vendor account.
    (T Code FBL1n)
    Example of residual Payment   
    Step one: When the vendor invoice is posted
    Expenses A/c  Dr   20000
    Vendor    A/c  Cr   20000
    Step two: If residual payment method is applied
    Vendor A/c                Dr          20000
    Bank  Sub Account  Cr           10000
    Vendor A/c                Cr          10000
    Note: Here   the system will clear the original open item and create a new open item for balance amount which is not paid now. In this case it is difficult to know the reference of the original invoice. If you will go for vendor balance display it will show an open item of Rs.10000 only.
    Assign points if you find it useful for you
    Regards.
    Surendra

  • Work on New Part Review and Release (NPRR), a bolt-on system (extension)...

    hi.................
    i need to know detail information about this and need to generate RICE components....
    " Work on New Part Review and Release (NPRR), a bolt-on system (extension)..........
    Only after approval from NPRR, the item gets transferred to Oracle EBS..."
    Can u help me in this..............

    prices pricestamp = new prices();
    for(int c=0; c < stringtext.length-1; c+)
    mmm=stringtext[c];
    mmm=mmm.trim();
    ccc=mmm.split("\\s");
    pricestamp.time=Integer.parseInt(ccc[0]);
    pricestamp.price=Double.parseDouble(ccc[1]);
    data.add(pricestamp);
    }This is definitely wrong. You have only created one instance of pricestamp and you just keep overwriting it with new values. You need to put the new inside the loop to create a new instance for each row.
    Also I doubt you really mean .length - 1, that doesn't include the last row.
    Style wise:
    Class names should always start with capital letters, fields and variable always with lower case letters. These conventions aren't imposed by the compiler but are established practice, and make your code a lot easier to follow. Use "camel case" to divide you names into words e.g. priceStamp
    When using single letter names for integer indices people tend to expect i through n. This is a historical thing, dating back to FORTRAN.

  • HT5622 How do I download part two of a purchased audiobook?

    I bought an audiobook and lost my internet connection before part two could download. How can I get the second part?

    Contact iTunes.
    Apple - Support - iTunes - Contact Us
    Audio books are not one of the media you can redownload for free.
    Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • I have an airport express and want to know how to set up two different wireless networks. One with 5GHZ and one with 2.4GHZ so different devices can connect to either.

    I have an airport express and want to know how to set up two different wireless networks. One with 5GHZ and one with 2.4GHZ so different devices can connect to either. I have an iphone 4 that will not connect to 5ghz.
    thank you!

    Your AirPort Express is already providing two separate 2.4 GHz and 5 GHz bands, but each band is using the same wireless network name.
    This is the default setup for the AirPort Express, which is recommended for most users. The theory here is that devices will automatically connect to the best quality signal based on their capabilities and distance in relation to the AirPort Express.
    It is possible to assign a different name to the 5 GHz band, and then "point" devices at that network to connect. Some users swear by this option.....(I am not one of them).... but you might want to give it a try to see how it works for you.
    Open Macintosh HD > Applications > Utilities > AirPort Utility
    Click on the AirPort Express
    Click Edit in the smaller window that appears
    Click the Wireless tab at the top of the next window
    Click Wireless Options near the bottom of the next window
    Enter a check mark next to 5 GHz Name.....which will automatically add "5 GHz" to the network name....so you can identify it
    Click Save, then click Update and wait a full minute for the Express to restart
    Now you will need to "point" your 5 GHz capable devices at the 5 GHz network name.  2.4 GHz devices will connect to your "other" network name.

  • I used to be able to download a lot of cd's, now I cannot download more than one or two cd's at a time. I am told that my 'cache' is full and I need to re-start iTunes to clear some of the 'cache' memory. What is the cache and how do I resolve this?

    CD download problems:
    I used to be able to download numerous cd's at a time but now I can only do one or two until I restart iTunes. I have been told that my 'cache' is full and will only empty a little a each restart. I did look at the properties and the 'cache' is showing full How do I correct or improve
    this?

    Final Cut is a separate, higher end video editor.  The pro version of iMovie.
    Give iPhoto a look at for creating the slideshow.  It's easy to assemble the photos in an album in iPhoto, put them in the order you want and then make a slideshow of them.  You can select from various themes and transitions between slides and add music from your iTunes library.
    When you have the slidshow as you want use the Export button at the bottom of the iPhoto window and export with Size = Medium or Large.
    Save the resulting Quicktime movie file in your Movies folder.
    Next, open iDVD, choose your theme and drag the QT movie file into the menu window being careful to avoid any drop zones.
    Then follow this workflow to help assure the best qualty video DVD:
    Once you have the project as you want it save it as a disk image via the File ➙ Save as Disk Image  menu option. This will separate the encoding process from the burn process. 
    To check the encoding mount the disk image, launch DVD Player and play it.  If it plays OK with DVD Player the encoding is good.
    Then burn to disk with Disk Utility or Toast at the slowest speed available (2x-4x) to assure the best burn quality.  Always use top quality media:  Verbatim, Maxell or Taiyo Yuden DVD-R are the most recommended in these forums.
    The reason I suggest iPhoto is that I find it much easier to use than iMovie (except for the older iMovie 6 HD version).  Personal preferences showing here.

Maybe you are looking for

  • Enhanced Receiver determination - for Integration Process

    Hi, Just wanted to confirm that if it is possible to have more than one Receivers, with Enhanced Receiver Determination and one of the Receiver happens to be Integration Process. I know with Enhanced Receiver Determinations you can find more than one

  • 4k resolution menu

    I think about buying a Laptop with 4k Resolution, but someone told me that I won't be able to read the menue bars and many other commands, so: when will LR be ready for 4k? When can they offer a scalation to enlarge the menu bars? Thank you, Kai

  • Syntax Error in Test - Class Method

    Hello all, I've created a Class, and when I try to test one of the methods (from within SE24), I'm getting the following error:  "Syntax error in test.  Display generated test environment?" (When I say Yes, I'm taken to %_JJ_TESTFRAME_CLASS program)

  • Compact patches for CRS installation.

    Dear All, Please suggest me the compact patches need for the below RAC configuration. OS-RHES4 2.6.9-22 EL SMP HPDL360 XEON Plaaning to put the ocr and voting disk on raw devices. And file system into ASM. Please suggest me which compact patches do i

  • Help! is itunes 6 worth downloading? plz read

    I was wondering if ne of u have downloaded the recent upgrade to itunes the itunes 6 and if it was worth downloading because i read a bunch of problem ppl were having with itunes 5.01 and i dont wanna download this and then get screwed because i jsut