Add cover sheet without affecting existing page numbering?

I guess the lack of response means either that my question is inappropriate in some way or else it's difficult or impossible to answer! Thanks for letting me post it anyway!
This seems to be a very informative site (just figured out how to access it and read the responses to all the questions), and I know I'll learn a lot from reading it in the future---so thanks on that account also.   ---JCI
ORIGINAL QUESTION:
Hi,
I have a script that inserts a new page (a cover sheet) at the beginning of a document (a chapter from a book) and makes a few other tweaks. It works perfectly _except_ for the following glitches:
(1) The pages shuffle (I would like the cover sheet to be a recto page and the first page of the document to be a recto page as well; the rest are facing pages ).
(2) The pages renumber (I would like to the cover sheet to be an invisible page number roman numeral "i" and the first page of the document to be page 1.1.
(3) If I just renumber the pages manually, I also have to retype all the section names that have been inserted previously into the section marker field (I have about 160 documents to work on, so....)
Is there any way to have the script avoid these problems? Please note that I inherited this script and know virtually nothing about scripting. Any help you can give—including any thoughts on whether coming up with such a script would even be possible—will be greatly appreciated!! Here is the script (and thanks in advance!):
var myFolder = Folder.selectDialog ("Choose a Folder");
var myFile;
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.NEVER_INTERACT;
if(myFolder != null){
    myFile = myFolder.getFiles();
    for(i=0; i<myFile.length; i++) {
        app.open(File(myFile[i]));
// insert page at beginning and apply master page
        app.activeDocument.pages.add(LocationOptions.AT_BEGINNING);
        var myMasterSpread = app.activeDocument.masterSpreads.item("C-WebP1");
        app.activeDocument.pages[0].appliedMaster = myMasterSpread;
// find and remove "[advanced release]" from document
          app.findChangeTextOptions.includeMasterPages = true;
          app.findChangeTextOptions.caseSensitive = false;
          app.findTextPreferences.findWhat = "[advance release]" ;
          app.changeTextPreferences.changeTo = " ";
          app.activeDocument.changeText();
          app.findTextPreferences = null;
          app.changeTextPreferences = null;
// determine if last page is blank and if so, delete
         var Lpage = app.activeDocument.pages.lastItem();
         if(Lpage.pageItems.length==0&&Lpage.guides.length==0){
                Lpage.remove();
// save and close file
        app.activeDocument.save(new File(myFile[i]));
        app.activeDocument.close();
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
Message was edited by: J Shee

Try this,
var myFolder = Folder.selectDialog ("Choose a Folder");
var myFile;
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.NEVER_INTERACT;
if(myFolder != null){
    myFile = myFolder.getFiles();
    for(i=0; i<myFile.length; i++) {
        app.open(File(myFile[i]));
// insert page at beginning and apply master page
            var _page = app.activeDocument.pages.add(LocationOptions.AT_BEGINNING);
            var myMasterSpread = app.activeDocument.masterSpreads.item("C-WebP1");
            app.activeDocument.pages[0].appliedMaster = myMasterSpread;
            var section = doc.sections.add(_page);
            section.pageNumberStyle = PageNumberStyle.LOWER_ROMAN;
            var section1 = doc.sections.add(doc.pages.item(1));
            section1.continueNumbering = false;
            section1.pageStart = doc.pages.item(1);
            section1.pageNumberStart = 1;
            section1.sectionPrefix = "1."
            section1.pageNumberStyle = PageNumberStyle.ARABIC
// find and remove "[advanced release]" from document
          app.findChangeTextOptions.includeMasterPages = true;
          app.findChangeTextOptions.caseSensitive = false;
          app.findTextPreferences.findWhat = "[advance release]" ;
          app.changeTextPreferences.changeTo = " ";
          app.activeDocument.changeText();
          app.findTextPreferences = null;
          app.changeTextPreferences = null;
// determine if last page is blank and if so, delete
        var Lpage = app.activeDocument.pages.lastItem();
        if(Lpage.pageItems.length==0&&Lpage.guides.length==0){
                Lpage.remove();
// save and close file
        app.activeDocument.save(new File(myFile[i]));
        app.activeDocument.close();
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
Regards,
Chinna

Similar Messages

  • How to add cover sheet without affecting page numbering?

    No replies yet, so perhaps I should change the question to "Can one add a new section break at the beginning of a document?"
    Or "How do you apply a section break on a Master Page so that when the Master Page is added at the beginning of a document, it does not change the numbering of the pages that follow?"
    Thanks very much for any help!
    [ORIGINAL QUESTION: Is it possible to add a cover sheet to an InDesign document without affecting the existing page numbering? I have a series of chapters from a book that need to be posted individually and require a cover sheet. Each chapter begins on a recto page and the page numbering is set with a prefix (the chapter number) and page number, e.g., page 1.1. I can manage to add the cover sheet without the other pages shuffling, but the cover page always becomes page 1.1 and the text thus begins on page 1.2 (even though it's a recto page). Is there any way to do this without having to manually reset all the page numbering in the Numbering & Section Options window?
    Thanks for any help you can give---many such documents to work on....  Also, never submitted a question before, so hope I've done this correctly!  ---JCI]
    Message was edited by: J Shee

    There are really two things to consider here. First is that page numbering normally controls which side of the spine a page is on (and switching sides can cause all sorts of problems if you have master text frames). Second is preseving the existing numbering.
    It's no problem to reset the numbering by starting a new section after you add the new page to the front of the file, but if this is a facing pages file you will want to add two pages to start so the rest of the doc doesn't switch sides, then start a new section and reset the start number (sorry, no way I know to do this other than manually). Now you can delete one of the pages in the first section and reset the number on the remaining new page to odd or even as appropriate and add your content.

  • Add style to large block of text without affecting existing styles within that text

    Hello! First post here.
    I have a long document of text that mostly does not have text styles attached (this was a mistake). However, there is a large number of areas of styled text within.
    Is there a way to select all the text and apply a style to only the unstyled text without affecting the existing styles?
    Doing this by hand text block by text block would take a long long time.
    Any help is greatly appreciated.
    THX!
    Ian

    winterm wrote:
    What do you mean by "unstyled text"? It must have some definition, anyway.
    Like others, [No Paragraph Style] and [Basic paragraph] are searchable, too.
    boomshakalaka! Thanks! Im familiar with this panel but didnt see how to specify 'Character Style: [No Character Style]'.
    Had to click on the icon

  • How do I use the same css style but different attributes, Without affecting another page.

    Hey everyone,
    I am using the "NivoSlider", for my dreamweaver page but I am not sure how to tell styles that one page has one attribute and the other one will have a different attribute.
    For example: in my "about us" I have a small slideshow with its own pictures. I then put  a gallery page with its own pictures, yet, I want to make that slideshow box larger without affecting the other small slideshow.
    I am using just one Style.CSS for the slideshow.
    Anyways, is their a way to tell tell the code that one page is going to be a different width then the other?
    Thank you!

    Embedded CSS rules take priority over styles in external style sheets.   So you can add page specific rules between your document's <head> tags and after all other links to external CSS files.
    <style>
         page specific rules here....
    </style>
    Nancy O.

  • Is there a way to rename a template without breaking existing pages using the 'old' template?

    Hi guys,
    I am using CQ 5.4. and I want to refactor existing code of a project. Part of that involves renaming existing templates. Renaming one locally, I saw that existing pages break because they can't 'find' the old template. is there a way to rename a template without breaking those pages?
    Thanks,
    Alex

    I'm not aware of any GUI tool that does this in Leopard. you can change the names of the share points by hand by editing the appropriate plists located in /private/var/db/dslocal/nodes/Default/config/SharePoints/ but that's a pretty horrible way to do it and is the opposite of user friendly. don't know any other way though.

  • BAPI_REQUIREMENTS_CHANGE - How to add new qty without refreshing existing

    Hello ,
    I am using this bapi the problem i am facing BAPI_REQUIREMENTS_CHANGE.
    Problem -
                    How to overwrite existing values.

    Hi Andre,
    Here is the description of the tables:
    table with the NEW content of: EBAN
    data: begin of xeban                           occurs 20.
            include structure ueban                         .
    data: end of xeban                          .
    table with the OLD content of: EBAN
    data: begin of yeban                           occurs 20.
            include structure ueban                         .
    data: end of yeban                          .
    table with the NEW content of: EBKN
    data: begin of xebkn                           occurs 20.
            include structure uebkn                         .
    data: end of xebkn                          .
    table with the OLD content of: EBKN
    data: begin of yebkn                           occurs 20.
            include structure uebkn                         .
    data: end of yebkn                          .
    Regards,
    Nitin.

  • Can't stop oracle replication without affecting existing table...

    Hi All,
    I am facing some problem with oracle replication set up. I have a replication set up already running fine. There is a table called Emp_temp in the replication group which is in ASYNCHRONOUS mode(replicating data for every 15 min). My application is writing data into this table which is in primary server (there are only two servers in the set up i.e. primary and secondary).
    I want to stop the replication but my application should keep on writing to Emp_temp table even after replication stopped. But when I stopped the replication (through oemapp GUI) my application is throwing errors stating that it could not commit to that table. Can anyone tell me how to gracefully stop the replication? Is there any way even after stopping the replication application can continue writing to the Emp_temp table?
    My application talks to the Oracle using OCI.
    Error in my application log is: "Error ORA-23326: object group "PUBLIC"."ASYNCH" is quiesced"
    Oracle Version using: Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
    OS: Solaris 10
    Your early reply is highly appreciated
    Thanks in advance.
    Regards,
    Iqbal

    Hello
    Yes, breaking the PUSH job would be the only solution. In multimaster replication the changes are applied on the remote site through the PUSH job hence you should mark this job as BROKEN to stop the replication.
    If you QUIESCE (or SUSPEND) the replication group via OEM, then it would not allow any DML changes to the tables in the replication group. Hence you should break the PUSH job instead of SUSPENDing the Replication Group.
    Again, you should re-enable the PUSH job at the earliest else the base queues for replication would grow very fast in a high OLTP system. Once these queues have grown considerably then that could raise performance problems with the PUSH job.
    Hope this helps.
    Thanks,
    Rijesh

  • How to add page numbers to cover old page numbers that were made manually.

    I have this checklist document that consists of 13 pages which was made from an older document. I just completed filling out over 50 copies of this document with information from the field. I then noticed that the page numbers all say "Page 3 of 14." Every page is called page 3. The original document had page numbers at the bottom of the page, but the text can't be covered up when I try to just add a footer and auto insert page numbers there. I did however notice that I am able to apply page numbering/ footer settings to multiple documents. If only I could add a box automatically to cover up the mistake area first. Is there a way to maybe add a white filled text box automatically to every page in this location, and then apply these settings to all 50 documents?
    Thanks for all of your help!

    In Numbers '09, use Insert > Page Number
    Place the page number in a page header, and it will appear on each age when in Print View and when the file is prnted.
    May have changed in Numbers 3 (current version).
    Regards,
    Barry

  • End on even without page numbering

    Hi.
    I have this RTF template that I'm using to generate a pdf file with lots of invoices.
    I'm printing this PDF in duplex mode. For that to be possible I had to use this tag to add a blank page to the end of each invoice in case it ends in an odd page:
    <?section:force-page-count;'end-on-even'?>
    The problem is that when the last page is added, it still shows the page numbering that I inserted on the header. My client is complaining about it.
    Is there any way I could add a last page without showing the page numbering?
    Thanks a lot.
    PS: I've read every post out there about Terms&Conditions but they didn't help.

    aaaahhhhhh !!!!!!!!!
    Thanks a lot . I was trying for this solution very badly.. How did you find the solution ? Can you point me to the reference so that I can have it for future issues/reference
    Once again thank u so much for updating the thread with the solution !!!

  • How to add sales history and purchase history without affecting inventory.

    In order to help client migrating sales and purchase history into B1.
    I checked through the Business One objects reference file. I couldn't find any object that allow adding historical record into both Sales or Purchase history, via DIAPI.
    Do I have to always depend on the Sales Invoice object to add the document and let it affect the inventory level.

    No, you can't add historical data without affecting GL and Inventory.  In SAP B1 any invoice addition thru DI API will automatically behave like the regular B1 process and it will post to GL and inventory.
    I saw in the partner edge portal SAP B1 forum a post from an SAP employee that is working on developing a process where historical data will be able to be migrated without afecting inventory and GL.  But there is no ETA on when this will be available.
    Regards,
    WB

  • Page numbering: 2 questions

    1) I'd like to begin numbering on the 2nd page (labeling it as "2") of a document. I can only get numbering to start on the first page ("1") and so on. Or, the second page gets labeled "1" and then continues on.
    and,
    2) Can I put the numbers outside the margin, way over in the upper right corner, for example. I can't figure how to get there.
    Thank you.

    Remove any existing page numbers. Open the Format Inspector and click on the "Section" tab (every new document has at least one section by default). Put a check-mark in the "First page is different" box. Put your cursor in the header on the second page and select "Page number" from the "Insert" menu. Make you're top margin smaller so the header is closer to the top of the page (put a couple of carriage returns after the page number to bump the top of the page body down).
    You're done.

  • Want my page numbers to start on page 3 (nothing on 1,2)

    I don't want page numbers on my front cover or inside cover. I want the page numbers to actually start on page 3... page 3 on page 3. How can I NOT have page numbers on the first two pages (cover and inside cover)?
    Ben

    Hi Dennis,
    I've just spent twenty minutes trying to get a 'specific' answer to my question -- reading through previous posts ... and I still haven't found it. One of the things I love about this forum, all forums, is that I can ask a specific question and usually get an answer (and sometimes even GIVE an answer) in very short order, avoiding spending huge amounts of time reading irrelevant material. I make films. I use about five very complicated apps non-stop all day long (sometimes all night too). My brain hurts from reading manuals. My eyes hurt worse. It would never be my intention to abuse a forum that is so good to me. And you can't imagine my appreciation level when I do get a quick concise answer to something I can't solve myself.
    All the best,
    Ben

  • Add excel sheet

    Hello,
    I'm trying to add new sheets in an existing excel file but I don't know how.
    Can you give me any example?
    Thanks.

    Hi Jose,
    See if this link is of any use to you:
    Excel in different  worksheets
    Regards,
    Ravi

  • How do I add page numbers to my document without the page numbers automatically changing. I do not want the page numbers the software automatically places into my document.

    How do I add page numbers to my document without the page numbers automatically changing? The title page is blank, I can type in 1 on the 1st typed page, but the #1 automatically goes into the next page and will not change.

    Click at bottom of the first page:
    Menu > Insert > Section break
    Click somewhere in the 2nd page (not the header/footer)
    Inspector > Layout > Section > Page Numbers > Start at 1 > Configuration > uncheck use previous headers and footers
    Click into the header or footer of the second page:
    Menu > Insert > Auto Page Numbers…
    If there is anything in the header or footer on the first page that you don't want just select it and delete it.
    If you really wanted to manual place page numbers on each page you will have to use a section break between each and every page. I can't imagine that would be useful.
    Peter

  • How do i add page numbers to an existing document

    how do i add page numbers to an existing document

    Not sure if you want to add page number in the footer of the page or want to reset numbering in the page thumbnail view, so I am giving you video tutorial link for both the methods.
    1. Header-Footer method.
    http://tv.adobe.com/watch/learn-acrobat-9/adding-headersfooters-to-your-pdf-documents/
    2. Adding Page number
    http://tv.adobe.com/watch/acrobat-x-tips-tricks/quick-tip-how-to-add-page-numbers-to-a-pdf -file/

Maybe you are looking for