How do you make page 1 the active page?

I am trying to write a script to perform a data merge, followed by a find/replace, page add, and finally export. I can get it to perform the merge and find/replaces that are needed.
When I add a new page manually I normally select the first page in the pages window then click add a new page at the bottom. Doing that makes every page after that go to 2 pages(like an open book). I don't know how to do this in the script, what I tried below didn't work. It adds a new page at the end of the document and that page is the active one on screen.
app.activeDocument.pages.item(0).select();
app.activeDocument.pages.add();
After the merge, editing gets really slow, taking 15-20 per letter I add or delete.The only way i've found to have it edit like you'd expect is by exporting it to the IDML format then reopening that file in InDesign. I haven't been able to find much on exporting via a script. I've seen exports similar to:
app.activeDocument.exportFile(ExportFormat.INDESIGN_MARKUP, newDoc, false);
But I don't know if that will work or not.
I'm very new to scripting in InDesign. I'm using InDesign CS5.5.

Hi again
This could work for the IDML export
main();
exit();
function main() {
          myDoc = app.activeDocument;
          f = new File("/Users/afile.idml");     // here you have to adapt it for your needs.
          app.activeDocument.exportFile(ExportFormat.INDESIGN_MARKUP,f, false);

Similar Messages

  • HT4400 how do you advance to the next page with focus 40 blue

    how do you advance to the next page with focus 40 blue

    Hello,
    To place your own images for previous and next button you need to use the fill feature. Please check the steps below:
    1. Go SlideShow options and Uncheck Edit Together.
    2. Select the next button and click on Fill to open Fill panel.
    3. Click On Add Image and select the image you want to use. Also select the fitting type as "Scale to Fill" or "scale to Fit "and Position as "Center".
    4. Do the same for previous button.
    Regards
    Vivek

  • TS1702 How do you get past the FAQ page on free music downloads??

    How do you get past the FAQ page on free music downloads??

    "BSOsoft".  You really ought to practice asking coherent questions.
    If I have downloaded the same app as you, I'd guess tapping the button called "Download All Pro - Click Here to Download" which is right at the top of the FAQ screen might be as good a guess as any.

  • How do you make ps6 the default program

    how do you make ps6 the default program

    I will let you know if works.  Thanks    BobC
    Date: Fri, 27 Sep 2013 11:17:43 -0700
    From: [email protected]
    To: [email protected]
    Subject: How do you make ps6 the default program
        Re: How do you make ps6 the default program
        created by gener7 in Photoshop General Discussion - View the full discussion
    Right-click on that saved image's thumbnail in Windows to bring up a menu.
    Select "Open with..." and from that "Choose default program"
    A box will open up with a list of Programs to  choose from. Photoshop CS6 64 bit should be in that list.
    Make sure "Always use the selected program to open this type of file" is checked.
    If you do not see it in the list, click the Browse button in this box and it will show folders in the Program Files directory. Double click "Adobe" then Photoshop CS6 (64-bit), then select Photoshop.exe and click "Open". It should add it to the list.
    Click OK and when you double-click on your saved file, it should open in Photoshop.
    Let me know if that worked for you or if you have other questions.
    Gene
         Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/5719659#5719659
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/5719659#5719659
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/5719659#5719659. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Photoshop General Discussion by email or at Adobe Community
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • HT204053 I have multiple devices used by family members, how do you make sure the kids don't see Moms messages from Dad and visa versa?

    I have multiple devices used by family members, how do you make sure the kids don't see Moms messages from Dad and visa versa?

    Hi Roger:
    Thanks for the reply.  I think I figured out the problem.  Apple has confused (at least in my mind) the different IDs that people can have.  In the iCloud settings, they use the term Apple ID and not iCloud ID.  I guess there really is no such thing as an iCloud ID.  There are Apple IDs with various attributes.  This is not clearly explained or easy to see (how could I look up to see if my Apple ID is associated with iTunes for example?).
    I created, what I thought were iCloud IDs for each family member, but we all use my Apple ID for iTunes.
    One other question - why does the syncing of Notes using iCloud require an @me.com email account.  That makes no sense to me.
    Thanks for your help!
    AO

  • How do you scroll to the next page in apps when it says "1-9 of 20"?

    I am new to using an iPad.  I have been tyring to load some free apps.  When looking for apps, it might say "1-9of 20", then "View all".  When I hit view all, it only shows me 12 apps.  How do you get to the others? 

    'L-R'  you mean right to left, starting the side where it has the little box at the top 'Sort by" - This is for the multi app view (1-9 of 20) you mentioned.
    If already on an individaul Apps page you have to quit back by tapping the box in the top left corner marked 'Search'.  Note that default view is to display both iPad and iphone and selecting one or the other individually may result in less than the original total, dependent on availability for that device.
    Use just one finger place it on the screen then draw it across the screen - avoid tapping as this selects.
    Best regards, Ct

  • How do you make it print first page first and not the last page first?

    I have a HP Officejet Pro 8600. How do I make the first page print first and not the last page printing first?

    Hi,
    From the application used to print open the print dialog and click Oroperties or Preferences to access the Printing Preferences screen.
    From the Layout tab set Page Order as Back to Front, then the first page will be printed first.
    Shlomi
    Say thanks by clicking the Kudos thumb up in the post.
    If my post resolve your problem please mark it as an Accepted Solution

  • How do you make drop caps in Pages?

    Word has a drop down in the Format column that give you an ap to make drop caps... like at the beginning of a chapter. How do you do it in Pages?

    Here you have two ways to do it
    http://www.freeforum101.com/iworktipsntrick/viewtopic.php?t=85&highlight=dropped +caps&mforum=iworktipsntrick

  • How do you shut off the opening page of Mozilla's new features?

    im getting really pissed off not being able to stop 2 pages from opening when i click on my firefox browser. one page which I want to open up is my yahoo.com page, the other is your new mozilla add ons page. its annoying and im about to stop using Mozilaa because of it. its ridiculous that we can stop it from loading everytime I open my browser. ive tried so many things to stop it. please help and thank you for your time
    kevin

    Do you mean the regular Add-ons page (the one that opens when you press Ctrl+Shift+a) or a page for a specific add-on?
    Do you get the unwanted page when you launch a new window (Ctrl+n)?
    If so, that can indicate either:
    * Your settings list two home pages. These articles will help in clearing that up:
    ** [[Startup, home page and download settings]]
    ** [[How to set the home page]]
    * One of your add-ons is showing the new page.
    If the extra page does NOT appear in a new window, could you test using your Firefox desktop icon a second time without closing Firefox? This should launch a new window.
    If THAT new window has the unwanted page, your Firefox shortcut might be hacked. You can check by right-clicking it > Properties > Shotcut tab. The Target for 64-bit Windows 7 should be no more and no less than the following:
    "C:\Program Files (x86)\Mozilla Firefox\firefox.exe"
    If THAT new window does NOT have the unwanted page, Firefox may be showing a "one time" page and failing to record that it has showed the page, so it keeps doing that one time action at every startup. Have you noticed Firefox having problems remembering any other settings changes? This article has a range of suggestions for addressing this kind of issue: [[How to fix preferences that won't save]].

  • How do you make Firefox the default browser when the normal way doesnt work?

    Im trying completely from chrome after a friend showed my how much firefox has got its act together. However i cant for the life of me set it as the default browser. I have tried the "make firefox the default browser" button in firefox, which simply opens the windows default programs panel. Whenever i try to use the panel it simply sets the http protocol to nightly which isnt even installed!( http://puu.sh/2vJHM ) I think a possible fix would be to manually change the registry, but i wouldnt know where to start.

    Did you check the box on ''Options > Advanced > General >[X] "Always check to see if Firefox is the default browser on startup"?
    Have you restarted Firefox and if so, or when you do so, what does that section on the advanced Firefox options show?
    Have you tried restarting your system after setting the default browser using the second suggestion and, after restart, check the setting per the second suggestion to see if that setting is holding?
    Updating your Plugins would have no affect on the default browser question. It was something that you needed to do to avoid security issues online by using an out of date version of Java. Java is not involved in the default browser issue. That is why I separated it from the first part of the reply with a line and began with the word "Other".

  • How can I make Reader the active window when opening documents?

    I am having trouble with this because right now documents open in the background and Adobe Reader does not become the active window.  This requires an extra click on Adobe to bring the opened document to the foreground.
    Nowhere to be found in Preferences.
    My system is Linux RedHat 2.16.0
    Adobe Reader 9.3.1
    Thanks a bunch.

    Sir,
    Inspect the following methods (all available to, say, a JFrame) - they might help you out:
    setVisible
    setState (to (de)iconify)
    toFront (request to bring to front)
    requestFocus

  • Vista - how do you make iTunes the default player for audio files?

    Having started using iTunes on a new Vista PC, I've found that it defaults back to Windows Media as the default audio file player every time the machine is rebooted.
    But worse than that, I cannot find any option to make iTunes the default player for MP3 files - under the Vista settings, the ONLY option offered is Windows Media: there is not even a box to tick for iTunes.
    Have others found this? Is there any way around this?
    (I thought that Microsoft was legally precluded from making these kind of enforced settings now???)

    Although I now seem to have successfully made iTunes the default player for audio files, iTunes has started putting up this message:
    "The iTunes Music Library file cannot be saved. You do not have enough access privileges for this operation."
    A quick scan of the forum shows this problem has come up quite a few times, but I'm far from clear if there is a definitive answer/solution. I am the administrator for the computer. It sounds worrying that the Library file is not being saved - should I be worried?

  • How do you make sure the form data prints (commercial offset printing)?

    We are commercial printers and have been using a PDF workflow for quite a while now. We recently received a PDF form to print but any information filled in the form just dropped out (all non-data printed fine). When we send it to a laser printer, everything is there but when it goes through the RIP and imposition software (both Heidelberg), all the data is missing.
    When I open the PDF from the client, I am not able to change or even highlight the data. There is a message saying the information is locked.
    We were able to get around the problem by importing the PDF into InDesign and making a new PDF from that but that seems to be an extra step that coulb be avoided.
    Anyone else with a similar problem (and solution)?

    How can you tell that it is an XFA form? If I can identify the form type from when I get jobs like this, I can use the workaround from the beginning.
    Here are a few more screen shots of things that are happening:
    When I try to Print to a PDF:
    When I use the Mac "Save to Adobe PDF" in the print dialog:
    I get this message often:
    and when I try to embed the missing font (PitStop), I get this:
    The only thing that has worked so far is placing the PDF in InDesign and Exporting to a new PDF from there. I guess this is making the flattened PDF that you talked about.

  • How do you make a 11x17 in pages on macbook pro

    Can you create a 11x17 document in pages on macbook pro. If so how?

    Yes. File > Page Setup... > Paper size > Manage Custom Sizes...

  • If I expand a web page using Control +, how can I make sure the next page I go to on that site will also be in expanded mode, and the 1st page will still be in expanded mode when I come back to it? This is automatic in Chrome browser.

    Right now the pages always revert to small size. It's a hassle having to expand them every time to make them readable for my vision-impaired eyes.

    Try the [https://addons.mozilla.org/en-US/firefox/addon/2592/ NoSquint] add-on, it gives greater control over the zoom options.

  • How do you turn off the Tab page. Changing 'browser.newtab.url' to blank doesn't do it.

    I don't want tabs. How can I turn them off?

    Hello,
    In Firefox 23, as part of an effort to simplify the Firefox options set and facilitate future improvements to Firefox, the option to hide the tab bar was removed.
    Fortunately, this can easily be resolved if you desire the keep tabs hidden. You can install "[https://addons.mozilla.org/firefox/addon/hide-tab-bar-with-one-tab/ Hide tab bar with one tab]", an extension hosted on Mozilla's add-ons site, which will restore the ability to hide the tab bar.
    Thank you and I hope this helps!

Maybe you are looking for

  • How to change background color in mail messages?

    Capacity to change background colours seems to have been removed.  Has anyone found where to do this please???

  • Script for jsp

    <script type="text/javascript"> function functiontest(process,empname) alert(process); alert(empname); document.empdetform.processName.value=process; document.empdetform.empname.value=empname; document.empdetform.submit(); </script> <c:forEach var="e

  • Xml in japplet

    Hi, I want to create a tree(with using jtree class) by getting datas from the xml in japplet with expand and collapse event..can anyone give some suggestion,how to proceed?

  • Un register and register database again in the same catalog

    Dear All, I've a requirement to Un-register the existing database from the catalog by removing all its information, and immediately registering the same database in the same catalog. Please advice How to unregister and register again by retaining the

  • Dynamic JCO Client

    Hi, there is a way to create a dynamic JCO.Client? I have this code: JCO.Client jcoclient =   JCO.createClient(                      "data",                     "data",                      "password",                      "it",                     "