Import MS docs on the odd pages only

A year ago, I received help from John Hawkinson (thanks again!) with a script to import word documents of several pages with the same master page. The discussions can be found here: http://forums.adobe.com/message/3732719#3732719

I would now like to modify this script to apply only to one side of a series of two pages using the master page even spread. In other words, let's say I have 300 pages face to face using A template. I would like to import 150 pages in the odd-numbered (right side) pages of the spread (1.doc page is imported into page 1, page2.doc is imported to page 3, 3.doc page is imported on page 5, etc.).

Is there an easy way to do this?

Thank you

Neil

> I think I would need to separate counters - one for the numbers of word doc and another God INDD page, where it is imported.

Yes my brother, I was supervising the "page number" thingy was reused in the script from John to select a numbered Word file.

Quick-and-Ever-So-slightly-Dirty: re - use the meter of the loop (page) but halve! (... and add 1 because the loops run from zero upward).

frames.textFrames [2] .place (new File("/path/to/page"+String((i>>1)+1)+".doc"));

I prefer to use the > operator here, rather than division, because Javascript is scrupulous about its divisions, an odd number like "3" by dividing by 2 will result in 1.5. Logic, but villain. Bit shifting the value 3 to the right ibehaves as 'divide', - rounded down the bit below, everything is lost.

Fortunately, you don't have the odd numbers in your loop * here * but hey, you can reuse this script on the odd numbered pages!

Tags: InDesign

Similar Questions

  • Code to merge two PDF files of the scanned book: one of the odd pages and the other pages even.

    I'm looking for an effective way merge two PDF files: one with all the odd pages scanned a book, one with all even-numbered pages. This question has been posted several times in many different forums.  I am unable to get the Javascript code that is given in the following forum to work.  https://forums.adobe.com/thread/286654.  Generally, the responses to this question are not useful for me because 1) they provide instructions that apply to an older version of Adobe (I use Adobe Acrobat Pro DC), or 2) they involve software purchase that I found to be ineffective. One post step by step to complete code that can do bonded labor and be registered as a custom through the command Wizard command (see the post from 11:27 January 13, 2016 to https://forums.adobe.com/thread/2063936, for an example of a good response to a different question) would be much appreciated.  Thank you, Carl

    You can use a large part of the script that was posted in the other thread and create a personalized out of it. In fact, it makes the script easier to understand, because all the "stuff" that is about adding menus and elevate the rights of scripts is no longer necessary.

    See here for instructions on how to create a custom in Acrobat DC command:

    Create orders customized in Adobe Acrobat DC Pro - KHKonsulting LLC

    Instead of the sample code of the blog post, you would use this (which is really just a copy & paste of the original script):

        // create an array to use as the rect parameter in the browse for field
    
        var arRect = new Array();
        arRect[0] = 0;
        arRect[1] = 0;
        arRect[2] = 0;
        arRect[3] = 0;
    
        // create a non-visible form field to use as a browse for field
        var f = this.addField("txtFilename", "text", this.numPages - 1, arRect);
    
        f.delay = true;
        f.fileSelect = true;
        f.delay = false;
    
        // user prompted to select file to collate the open document with
        app.alert("Select the PDF file to merge with")
    
        // open the browse for dialog
        f.browseForFileToSubmit();
        var evenDocPath = f.value;
    
        var q = this.numPages;
    
        var t = app.thermometer;
        t.duration = q;
        t.begin();
    
        // insert pages from selected document into open document
        for (var i = 0; i < q; i++) {
            var j = i * 2;
            this.insertPages(j, evenDocPath, i);
            t.value = i;
            t.text = 'Inserting page ' + (i + 1);
        }
        t.end();
    
        // remove unused field
        this.removeField("txtFilename");
    

    Given the instructions in my blog, you should be able to create this custom command and run it. To run it, the important part is that you load the 'weird' part of the document first, then launch the custom command and then select the item "same" document.

  • Header/footer for the first page only

    Hi all

    Is it possible to have headers/footers with option, first page only? The current options are

    • Not first
    • Only in the last
    • Not last
    • Back only
    • In front only

    Is it possible to have 'first only?

    We use Documaker Studio 12.3. Thank you.

    I think that if you want a header, footer on the first page only, which means that you should not use the copy on overflow attribute. Then those who would only be on this first page.

  • How do I display the footer message in the second Page only

    Hi all

    I was working on BI Publisher 10 g,

    I have a report called invoice printing, then now if I ran the unique billing report, I have two pages of output but the address in the page footer appears in two pages, it is possible to print the address on the last page only. That is to say when the Bill is on the need to print address.

    Concerning

    Srikkanth.M

    Thank you for using your content of the specific page for the last page footer

  • Links tool &gt; select all selects links on the current page only

    Using the link tool and choosing Select all to select all links in the document. Something has changed so that now it selects only the links on the current page only. Is there a preference setting that controls the selection (current page or document)? If there is, I changed it by mistake and need to know how to change back. If this is not a setting, preferably, is - that someone had the same problem?

    It depends on the display mode. If you visit the pages in the form of simple pages,

    Only links on the current page are selected.

    If you use modes of vision continues, all the links of the

    document will be selected.

  • Hi, XI - Win 7 64 bit.  AR prints only the even numbers when I allowed of the odd numbers only :-(

    Hi hope you can help.

    AC' reader XI (win 7 64 bit).   I expected that a series of pages of odd number only, but only prints even numbers.

    Tried several sets of tests, but still prints even pages.   It is a PDF of a new Casio keyboard manual from their site.  I can read

    the PDF on my computer and can print single pages, but the above problem is disconcerting.  ~ Thank you if you can offer any help.

    see you soon

    Thanks, MVP for your quick response.

    Yes, I tried now opt to print even pages only in the range of 1 to 8 and now it prints the odd numbers. Hey Hey

    Well, for the sake of my sanity, I'll take a break for some sponge cold and some chanting and then return refreshed.

    EDIT - SOME TIME LATER: well, thanks for any help, greatly appreciated.

    Now I see what the problem is, thanks for the explanation page numbers cordially.

    Looks like Adobe Reader made its own system of numbering pages before printing.

    Would have liked to wear to try, but did not want to destroy half of a forest.   Presented the PDF document on the local printer instead. quite.  :-)

    Very much appreciate your help. Think I'll stay for the simple printing of the page (no double-sided) in the future.  See you soon.

    Harold

  • Impossible to import all bookmarks in the IE 11, only some. How to do it.

    When you import IE 9 or 11 IE only a few bookmarks are imported. Why?

    The format for the imported bookmarks has folders alphabetically with individual bookmarks. The desire of records that are in front of individual bookmarks.

    If there are problems with importing IE bookmarks in Firefox, then export favorites in Internet Explorer to a HTML file and import this file in the Firefox Bookmarks Manager.

    If you don't have the menu bar in Internet Explorer, and then right-click on the toolbar above to activate the menu bar.

    • Export Favorites in Internet Explorer to a file (bookmarks.html) HTML:
      File > import and export
    • Import HTML file in Firefox:
      Bookmarks > show all bookmarks > import and backup > import bookmarks HTML

    See "Import from another browser" and "import from file":

  • Footer text on the first Page only

    Hi all
    I need assistance with the addition of the text on the first page of my .rtf in the footer only. I searched the forum and I have not found exactly what I'm trying to implement. There is a wire that has
     <?start@first-page:body?>footer text <?end body?>
    but once this syntax is added, I get an error message. My end user want that the text on the first page of the footer, the model may be one of many pages once presented as a preview. Any information or help is appreciated.

    You can use different first page option in ms word, then you will get a single footer on the first page.

    go to your header or footer double click then you go in the upper msword option another first page check only option so that you can get the footer that you need.

    http://winrichman.blogspot.com/2008/08/different-page-header-and-footer.html

  • Print the last page only

    Hello

    I'm looking for a script that will print on the last page of a document. My form has a repeating subform and depending on how I setup, the last instance (which has always lands on the last full page) is the only one I need the user who opens the form to be able to print with a single click of the "print" key.  This will help prevent them form having to enter the page to print in the print window.

    Thanks in advance.

    Hello

    The print method has eight parameters, that you can change to affect printing. The second parameter is the start page and the third parameter is the finish/last page to print.

    All you need to do is replace the second parameter '0', with the third default (xfa.host.numPages - 1) m:System.NET.SocketAddress.ToString ().

    This should work:

    xfa.host.print(1, (xfa.host.numPages -1).toString(), (xfa.host.numPages -1).toString(), 0, 0, 0, 0, 0);
    

    Hope that helps,

    Niall

  • does not scan the whole page, only the column

    My All-in-one HP Officejet Pro L7580 scanner does not scan the entire page.

    Regardless of where to send... Word, Mail, photos... all I get is about 3 inches of column of the entire page.

    What can I do to remedy this?

    IF the copy works perfectly. Try to open the HP Solution Center and find the settings > scan settings > scan document or scan picture settings.

    Search for advance settings or more and are looking for an option on the digitization of multiple files or just the entire page or something to that effect. The software may have missed in the analysis just a part of it. You can check the settings where you can have a preview of the scanned document and find the broken line around the scanned image, you need to move, it will scan what's inside the broken line.

  • Changes to the web page only appear not

    I use Dreamweaver CS3, I've made a few changes text to one of my web pages, I clicked on save, went to check on preview browser and it isn't here. What I am doing wrong?

    Thank you

    If you downloaded files to the server and then surfed on your web page online, and changes are not displayed, your browser may have just cached the old version of the web page.

    Web browsers cache things like html, javascript, css, images, framesets, and so on so that your browsing experience is faster you never see again the page.

    Press and hold the 'SHIFT' on your keyboard while at the same time a left click on the button "Reload" in your browser to get the freshest version of the web page you just downloaded.

    Please note that this technique does not always work if your web page uses frames.  If such is the case, do a right click in each picture and select reload from the context menu.

  • Import of text in the Apple Pages

    I used MS Word for many years in Mac and PC systems.  However, InDesign CS4 version 6.0.6 for Mac has become my main word processing application. ID's reliable features and control over all aspects of the document are the main reasons.

    I frequently need importing text from Word documents.  ID has facilitated this process.  Now, I'm interested in the import of text of application Pages from Apple using the ID on the Mac.  I am not able to do.  Adobe will consider making as possible in future releases?

    Save as RTF of Pages.

  • See the Web Pages only in code

    I am new to Dreamweaver 8, but used GoLive. I used the find/replace links, when the menu goes from showing the Design view displays only the Code view. Then, of course, I screwed up. I tried to create a new web site, after an hour, frustrating to try to solve the problem without success.

    Then, I deleted and reinstalled the program, but the relocation did nothing. Some files need to be hidden.

    I tried to use the fix/restore without success.

    Question: How can I get the program to return to its original settings showing the Design and Split screen in addition to the Code view in the Menu bar?

    Alan,

    Thank you for your help.

    Code, the Split and design Modes work in DW8 and exporting site definitions, all of my web pages seem to work in these modes.

    Thanks again,

    Jim

  • How to add all the Bookmarks imported (from Chrome) in the toolbar (not only the menu bookmark)

    I was able to import all bookmarks in Chrome but want them to appear as of Firefox bookmarks and be immediately accessible (like they were before I migrated to chrome from Firefox) and the toolbar of bookmarks. I can't find a way to do this.

    Import Google Chrome Favorites

  • My canon mg2200 printer does not display the odd page numbers

    When I try to print this printer prints in this order 2,4,6, another problem when I try to print individual pages from a textbook, I hit the numbers and another page will print.

    Help, please.

    Hi Angelitos,

    Welcome to the Microsoft community.

    I would like to know some information about this printer problem so that we can help you further.

    1. You get the error message when printing?
    2. Did you changes to the computer/printer settings prior to this problem?

    I suggest you follow the link and the instructions mentioned in the link.

    Solve printer problems

    http://Windows.Microsoft.com/en-us/Windows/printer-problems-in-Windows-help#fix-printer-problems=Windows-7&V1H=win8tab1&V2H=win7tab1&V3H=winvistatab1&v4h=winxptab1

    I hope this helps. If you need help with Windows, let us know and will be happy to help you.

Maybe you are looking for