Copy from Doc1 and paste in Doc2

HI ALL,
Requirement:
My requirement is copy all pageitem from Source Document(doc1) and paste in Target Document(doc2).
[Note: doc1 contains many pages]
Trying Code:
It will paste Ist page only. Not repeated for next process.
var doc1 = app.documents[0];
var doc2 = app.documents[1];
for(i=0; i<doc1.pages.length; i++)
    //var myPages = Pages[i]
    //alert(Pages[i])
    doc1.pages[i].pageItems.everyItem().select(SelectionOptions.ADD_TO);
    app.copy ();
    app.activeDocument = doc2;
    app.pasteInPlace ();
Kindly check and advise.
Thanks in advance
BEGINNER

Try something like this:
var doc1 = app.documents[0];
var doc2 = app.documents[1];
for(i=0; i<doc1.pages.length; i++)
    if(doc2.pages.length < i+1){
        doc2.pages.add();
    //alert(Pages[i])
    doc1.pages[i].pageItems.everyItem().duplicate(doc2.pages[i]);

Similar Messages

  • Copy from clipboard and paste in Web Dynpro table

    Hi
    I have a client requirement where the client wants to copy the table from some already existing application and paste the data  directly in web dynpro java table.  It is similiar to copy the data from clipboard and paste it directly in web dynpro table.
    I would like to know is it feasible. If yes, please provide some links or guide me on achieving the same.
    Thanks
    Harsimran

    Hi
    I think one way you can do it,
      1 . try to export the table dato to excel sheet.(copy and paste to excel)
       2. Importing the excel data to WD table.
      for more details about reading excel data, there is many blog on sdn just check it.
    Hope will help you
    Thanks

  • Copy from safari and paste somewhere words is hard to use

    I want ot copy a art clip from safari and then paste it somewhere  I have word but it is very hard to use   I have numbers and the art clip can not be sized
    so where can I paste the art clip and be able to put in text and size, color, text, etc  then print

    Insert a Shape into Numbers first (from the drop down Shapes menu in the top of Numbers).
    Then drag the image from Safari into the Shape you have created (not into a cell in Numbers).
    You can then resize the shape and if you click on the shape you can adjust the mask which will control how much of the image you can see.

  • Copy and pasting - maintaining content integrity when copy from pdf and pasting to word doc

    My firm is currently using an older version of Acrobat to transfer portions of medical report to a word document format. We are only taking select excerpts and not exporting the whole document. As of now, i copy and paste the needed piece to word but the integrity of the transfer is terrible. Many misspelled words, wrong spacing, characters replacing letter, etc...We are curious if this issue could be resolved by upgrading to the latest version of Acrobat. Thanks for your help!

    If you could give the version of Acrobat and post some before and after screen shots it would help us understand the issue (yes, avoid any personal info). Was the original PDF created as a scan? If so, is it clearscan or searchable? There are many issues that are hard to comment on because we don't know how the PDF was produced or what has been done to it in the meantime. It may be that an upgrade would help, but not necessarily. If you have a spare machine available, you could always download and install the trial to see if it would resolve the issue -- I would not install the trial over your current version.

  • [solved]How can I copy from urxvt and paste in firefox?

    I can't copy anything from urxvt to firefox,but I can copy from firefox to urxvt.
    I use fluxbox,anyone can help me?

    zen_guerrilla wrote:
    Add these lines to your .Xdefaults:
    URxvt*perl-ext: default,mark-urls
    URxvt*urlLauncher: firefox
    and source it with xrdb ~/.Xdefaults. Then double-click on the url on urxvt, press Ctrl and right click the url. Select 'run firefox' and you're good to go.
    ...or you can just middle-click the link and it'll open in firefox.

  • Copy from word and paste in Firefox

    When I copy rich text with links and stuff from word into firefox... only the plain text is pasted. So all the links and other styles don't show.

    No, it's not a form. I'm pasting in the text editor from hotmail, gmail, etc... The same pasting works normally in IE and Chrome.

  • I have to paste/special/text when copying from Firefox and pasting in Word or Excel

    When copying data from a table on IE, I just have to paste (ctrl-v), and the data is pasted into appropriate separate cells.
    In Firefox, I have to "paste special" and click "text" to separate the fields. Otherwise, all the data is pasted into a single cell or in the case of Word, one paragraph.
    Is there a setting that can be designated to allow paste as in IE or as within Word or Excel?

    The [https://addons.mozilla.org/firefox/addon/1852/ Dafizilla Table2Clipboard] extension should help with this.

  • I used to copy from emails then paste to my word processor, now there is no edit option on firefox. why?

    there isn't an edit option in firefox. therefore i can't copy from email and paste to word processor. why?

    You can find the Copy, Paste, and Cut buttons next to Firefox > Edit (and in its sub menu) and in the regular Edit menu on the menu bar (press F10 if the menu bar is hidden).<br />
    The buttons next to Firefox > Edit are enabled if there is something to do with them, just like with the toolbar buttons.<br />
    You can find the Copy, Paste, and Cut toolbar buttons in the toolbar palette in the Customize window and drag them on a toolbar.<br />
    Press F10 or press and hold the Alt key down to bring up the "Menu Bar" temporarily.

  • After updating numbers and pages I can no longer copy multiple cells from numbers and paste and match style to pages.

    After updating numbers and pages I can no longer copy multiple cells from numbers and paste and match style to pages.  I used to be able to select multipule cells in a row (such as company name, address, etc.) then paste and match style on to a pages letter. I found the paste and match style option in the edit menu, however it will only work one cell at a time. Before the update is was working great.

    For diagnosing purpose thy the procedure in a new user account and see if it works there. You create a new user account in the System Preferences > Accounts. If it works in the new account it is probably a corrupt plist file that needs to be deleted.

  • How do I copy a color from Kuler and paste it to a word document?

    How do I copy a color theme from Kuler and paste it to a word document?

    Unless there is something unusual about the table, it should copy in by selecting in Pages, selecting Copy, moving to Keynote, tapping, seelcing paste.
    If the table structure is copying in, but you can't see the text (is that what is happening?), you might try selecting ghe table and changing the text color using the formatting tool.

  • How do I copy a photo from iPhoto and paste it into a text/Pages document?

    How do I copy a photo from iPhoto and paste it into a text/Pages document (using iMaC)?

    Use the Media browser in Pages and just drag the image over.

  • Problems when i copy text from Pdf and paste on Word

    In Pdf documente the text is in perfect conditions, but, when i copy the text and paste in WORD document the character change into random crazy character like: "()*"*&!(!*"(!"(!)"( )*"()!*("!&("@*")(!*@"!*@(
    how i fix this??

    I have the same problem when copying the PDF into a Word file. I tried Save as RTF doc. and it is still just symbols.
    It could be a font problem, because it has some weird Gill Sans and Futura fonts. I am sending a picture as an example.
    The option of exporting as Tiff and then applying OCR is interesting but still is kind of slow when i have a 100 pages document. If the fonts is the problem is there any way i could select the whole text and apply it a known font like Arial?
    Thanks for any info!
    Cheers,
    Sebastian

  • I want to create an external video widget with iAd. I followed the steps and copied the Url and paste it in the Video pop-up menu in the Properties section of the inspector. When i select 'preview' the video doesn't play and the Url that i pasted is gone.

    i want to create an external video widget with iAd to use in an iBook. I followed the steps and copied the Url and paste it in the Video pop-up menu in the Properties section of the inspector. When i select 'preview' the video doesn't play and the Url that i pasted is gone.
    hope someone can help!

    May have something to do with whether or not the URL can be reached while building your widget.  I've got a video on the web. When I enter the URL into the field for the video object and click to another field,  the URL is replaced with some text indicating that it is accessing the video then updates itself to displaying just the name of the video file.
    It shows just fine in preview and I can see the full path to the video when I export the widget so it should work for you. 
    Is the video accessible from your Mac while you're laying out your widget?
    -Mark

  • On MacBook 10.6, in iTunes 10.3.1, music downloaded from CD, copied from Recently Added, pasted into named New Playlist Folder, is displayed there but can then disappear from this folder. What am I doing wrong?

    QUESTION:     On MacBook 10.6.7, in iTunes 10.3.1, music downloaded from CD, copied from Recently Added, pasted to named New Playlist Folder, is displayed as a list but can later disappear. What am I doing wrong?

    Hi, Mylenium,
    Thanks for your prompt reply, I'm afraid it hasn't helped. I don't see anything wrong in my device manager.
    I have also gone and updated every driver, especially the motherboard chipset and the Sata Intel Rapid Storage Technology driver.
    Unfortunately, this hasn't made any difference.
    Any other suggestions?
    Many thanks in advance!
    Hugo

  • I have a pdf file which contains text if i copy all text and paste them into notpad and save file as .txt Is it change the ascii value of text ?

    I have a pdf file which contains text if i copy all text and paste them into notpad and save file as .txt Is it change the ascii value of text ?

    How to know character's encoding is ASCII?

Maybe you are looking for

  • Need help in creating logic

    Hi all, I need suggestion of all of you guys in approaching my goal. What i want to do is... I have a bow still at one place but can rotate at its pivot point and there is an arrow that is used to pull the thread of the bow, as i drag back the arrow

  • Hide command window from transactions in sap portal

    Dear experts               sir i want to hide command window from transactions iview in sap portal when i using sap gui for windows  sir i know very well settings for sap gui for html. so is there any possiblity for hiding command window from transac

  • How to use ActiveX in Forms 6i

    Hello friends: Being a novice forms developer I'm eager to gain the skill of using ActiveX in Forms 6i. I 'll appreciate if anyone could help me finding some online tutorial on this issue. Otherwise, I 'll very highly appreciate if someone would shar

  • Javascript focus() is not working anymore in firefox 22, thank You

    With this sample code, focus() is not working <pre><nowiki>Name <input name=cName id=cName size=50 onblur=chkName(); /> <br> Last Name: <input name=cLastName id=cLastName size=50 onblur=chkLastName(); /> <br> Another Field: <input name=cAnother id=cA

  • Regarding Payment Options.

    Hi, I am from India. I don't have credit cards. I am interested to buy the license, which is on month to month basis. Kindly let me know any other alternative payment options. Thanks in advance