[JS][CS3] Copy-Paste

Hi
I am pretty sure this has been asked before, but I cannot find it in the forum.
Is there a way to include in the JS a copy method to select an image, and paste into a text frame as an inline graphic?  I have placed images as inline graphics before with JS, but I was using a path to a folder.  In this new case, I cannot point to a folder for the image as the image is not on an attached volume, I am carrying out this script on a document already populated, but with missing links.
I hope this makes sense to someone!
Cheers
Roy

Hi Roy,
It can indeed be done that way. You just have to select the insertion point (and I mean select in this case) before issuing the paste.
I prefer to use a library to achieve this goal, along these lines (this code assumes I already have a library open):
      var myTableTab = myDoc.textFrames.item("TableTab").getElements()[0];
      // Move TableTab inline using library for temp storage
      var temp = projLibrary.store(myTableTab);
      temp.placeAsset(myStory.paragraphs[tableLoc].insertionPoints[0]);
      temp.remove();
      myTableTab.remove();
An advantage of this approach is that it leaves the clipboard unchanged.
Dave

Similar Messages

  • Indesign CS3 - copy paste and export problem

    When I try to copy text in Indesign CS3 and paste it in Word 2007 - or even in notepad - nothing happens. Pasting works fine when I stay in Indesign, but not when I try to paste it in another application.
    So I tried to export text to RTF (selecting text, export to rtf, give a name als save), but no file was created.
    Pasting text from another app. into Indesign just works fine.
    Am I doing something wrong, or is this a bug?
    Thanks for any advise.
    (Windows Vista, Dell 9200, 4 MB memory)
    L.L.

    I solve this problem in windows XP using the Phaedra's first optimistic tip and worked fine to me.
    When I tested the IDcs3 in another profile it was clear that the problem is not in the program, but in permissions or another detail in the user config.
    To simplifly my life, I create a new user account "MIGUEL2" in Windows as admin powers. With this new account I "reboot" my oldest ("MIGUEL") account to user mode. Restarted windows and, with "MIGUEL2" I reset the privileges to "MIGUEL" to admin user.
    Now I can export txt and rtf files from IDcs3. ;)
    You can skip the last step and work only with the new account or just work as user, not admin...
    Really weird. Why this happened? I don't know... but I'm happy that was too simple to solve...
    Best wishes
    Miguel Leite

  • JS CS3 copy, paste and transform

    I have a script that allows the user to select objects on a page (in this case text frames) and create a new page user defined and then paste the selection on the page and make it fit the page size.
    I'm having a slight problem where the text frames in the group are not showing the text (get text overflow) after the resize. If I comment out the myGroup.geometricBounds = [0,0,38,38]; line in the script below and manually resize the group to the document height and width (38,38) the text frames in the group are all ok.
    var myNewGroup = new Array;
    for (i=app.selection.length-1; i>=0; i--) {
    myNewGroup.push (app.selection[i]);
    var myGroup = app.activeDocument.groups.add(myNewGroup);
    myGroup.move(Array(0,0) )
    myGroup.geometricBounds = [0,0,38,38];
    If anyone has any suggetions it would be greatly appreciated.
    John.

    This seems to be working. I went with the transform() in the end. If anyone has a better way please let  me know.
    var myNewGroup = new Array;
         //make group
    for (i=app.selection.length-1; i>=0; i--) {
        myNewGroup.push (app.selection[i]);
      var myGroup = app.activeDocument.groups.add(myNewGroup);
      myGroup.move(Array(0,0) )
           //get size of group
      var mySelSize = myGroup.geometricBounds;
             //get size of document
        var myDocHSize = app.activeDocument.documentPreferences.pageHeight;
        var myDocWSize = app.activeDocument.documentPreferences.pageWidth;
             //get scale value
        var myScalH = myDocHSize/mySelSize[2];
        var myScalW = myDocWSize/mySelSize[3];
             //apply transform scale
        var myScaleMatrix = app.transformationMatrices.add({horizontalScaleFactor:myScalW, verticalScaleFactor:myScalH});
        myGroup.transform(CoordinateSpaces.pasteboardCoordinates,AnchorPoint.topLeftAnchor, myScaleMatrix);

  • Copy/Paste images into Contribute CS3

    We have been copying and pasting images from Word Documents
    in Office 2003 into Contribute CS3 at my organization when
    developing content. We have been able to copy/paste images from
    Office 2003 and other programs like Paintshop Pro and SnagIt.
    Since upgrade to Microsoft Office 2007 all image copying and
    pasting has stopped working.
    Is there a known issue with this?
    Does anyone else have Office 2007 installed and is able to
    copy/paste images from a Word Document into a page in Contribute
    CS3?

    It appears that the problem only occurs if you are copy and
    pasting from something that hasn't been saved yet.
    In Word I inserted an image from my hard drive and tried to
    copy/paste it into Contribute and that failed. I then saved the
    Word Document to my hard drive, re-opened it and was able to
    copy/paste fine.
    Power Point, Snagit and Pain Shop Pro appear to have the
    problem even if it's been saved first.
    I was able to copy/paste an image from a Word Doc and
    PowerPoint into MSPaint just fine. I was also able to copy/paste
    between Office applications with out any problem. Snagit could
    copy/paste into Office just fine and MSPaint.
    This problem appears to be specific to Contribute CS3 but
    only from certain sources.

  • I cannot copy/paste in CS3

    Pretty basic functionality we're talking about here.
    I also cannot copy back and forth between Ps and Ai.
    Am I missing some "cool new feature"?
    I already tried trashing the prefs.

    There are many copy/paste issues between Adobe apps. It's worse in CS3, but constantly and inexplicably I will no longer be able to copy shapes from Illustrator and paste them into After Effects as masks.
    I have to restart one or the other-- often times both-- in order to make it behave again... but of course it only works 2 or 3 times and stops again.
    I have wasted so much time with this in the last couple of days I cannot even tell you. And add to that the fact that Illustrator just hangs on quit about 75% of the time for no reason and must be force killed, which just takes even more time out of the day.

  • CS3 .indd and .inx file freezes (not responding) in soft returns, copy/paste, across machines

    My file first started crashing when I tried to soft-return following an em-dash, en-dash, or hyphen. For a while I worked around this by soft-returning on the line below, typing in the text from above, and backspacing the line above (all to help with typesetting the rag).
    I had diagnositics run on my machine at the Genius Bar where they replaced my battery and ran first aid, etc.
    Software-wise, I've since tried deleting preferences, etc, in the library. I looked to delete the application support file but didn't find one. I also tried opening the file on a second laptop and it still crashed when I did the items above (returns, copy/paste). I tried exporting to an .inx to clean up the file. However, when I open it (Untitled) and try to save it as an .indd to keep working, the software freezes.
    I'm using InDesign CS3 and Mac OS 10.5.8.
    I've copied the crash report (from the frozen .inx saving) here: http://pastebin.com/Dq9UCgk1
    Thank you in advance for your assistance

    As  I don't want to install additional software to measure temparetures I can't tell you about my exact core temperatures. However, I can tell you that my fans go off again when load decreases for some time.

  • CS3 & Leopard - can't copy/paste from InDesign Illustrator?

    I have just loaded Leopard and then CS3 onto my new MacBook Pro and then upgraded my existing iMac with another Leopard and the same CS3. Neither machine will allow me to copy/paste images or text boxes from InDesign > Illustrator - It appears to try to (shows the working color wheel - then nothing happens) It will allow me to select/copy the text WITHIN a text frame but will paste text only - not attributes????? I can copy /paste Illustrator >InDesign. also have no problem between Photoshop and either of InDesign or Illustrator?????? Have spoken to Adobe - they have no solution at this point and are 'getting back to me'.... Not a problem on Tiger/CS2 on iMac before upgrade. Appreciate your help!

    Possibly running out of ram since it needs to rasterize for photoshop. Save the ai file then let photoshop open it.

  • CS3 - Copy and Paste from InDesign to Illustrator NOT working

    I am trying to copy and paste some graphical elements from InDesign to Illustrator. The Paste command is active in Illustrator, but when I evoke the command, nothing is pasted. What is wrong?

    Apparently it is an issue with Leopard (and Illustrator)
    Workarounds:
    1) Export from InDesign as eps or PDF, or
    2) Copy paste into Photoshop as a Smartobject, and then double click the layer to edit smart object (it will open in Illustrator)
    I know, it's a pain.
    Ian

  • Getting rid of Multiple Spaces in Code View (after Copying/Pasting)

    Hello,
    I'm trying to find a way to get rid of multiple spaces between words in Dreamweaver CS3's code view.
    Oftentimes, when I copy/paste text from elsewhere (e-mail, website, etc), the Dreamweaver code shows up with multiple spaces. Normally, that wouldn't be problem -- except that my blog's auto-tag plug-in doesn't detect selected phrases when there are multiple spaces between words, e.g., it'll detect "Swiss Alps" in a post but not "Swiss  Alps" (notice the extra space between words in the second phrase).
    If at all possible, I'd like to be able to keep Dreamweaver's text formatting option when I copy and paste, as that means I don't need to manually put words in bold/italics.So, is there a way to keep that option while getting rid of all the extra spacing between words?
    By the way, I'm familiar with Wordpress CSS, but not with Dreamweaver CSS. Not sure if there's any difference.
    Any assistance would be much appreciated.

    I make it a point to never paste formatted text into HTML pages.  Formatted text from MS Office usually contains a variety of junk you don't want and I don't have that much faith in MS Word code removal tools.
    Bold and Italics from Word or Outlook should be changed to current HTML tags of <strong> for bold and <em> or emphasis for italics anyway.  Also see Logical Tags here:
    http://www.htmlcodetutorial.com/logical.html
    Find and replace is good for removing whitespace if you know how to do it correctly. Make backup copies just in case things go wrong.  http://www.tjkdesign.com/articles/whitespace.asp
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    www.alt-web.com/
    www.twitter.com/altweb

  • Problems doing copy/paste from Flash to Illustrator

    This is a problem I've had since Flash 8: when doing a
    copy/paste from Flash to Illustrator (on Windows), there's extreme
    degradation of the artwork, sometimes to the extent that no actual
    art is even copied. All the curves seem to be approximated with
    straight line segments, but at some point it just seems to give up
    even trying, leaving an unidentifiable blob for most of the object.
    As I said, sometimes it doesn't even copy anything at all -- all
    that shows up after pasting into Illustrator is an empty group.
    The weird thing is that this process worked fine in Flash MX
    2004. What could possibly have changed? I was sure with CS3 it
    would be fixed, but it wasn't. I haven't tried Illustrator CS4 yet,
    but copying from Flash CS4 to Illustrator CS3 produces the same
    problem.
    I've seen a few other reports of this problem in other
    forums, but I've encountered it on every install of Flash and
    Illustrator I've tried (admittedly, all Windows machines, but three
    or four different ones, both XP or Vista). Can anyone here confirm
    that this problem exists or doesn't exist on their computer? To
    test it, create a piece of art with plenty of curves and several
    colors in Flash, then copy and paste it into an illustrator
    document.
    If this problem is as widespread as my experience seems to
    indicate it is, why hasn't it been fixed in two major revisions of
    the software? Is Adobe even aware of it? If not, how can I let them
    know? I'm getting majorly sick of having to deal with it.
    Illustrator used to be a much larger part of my animation process,
    but now I can't use it how I really want to because of the bad copy
    and paste functionality.
    -David

    Hi,
    The integration between Flash CS3 and Illustrator means you
    can copy objects from Illustrator to Flash and i think if you copy
    from Flash to illustrator or Photoshop, you would not get a good
    results.
    You can solve your problem by exporting your Flash work as
    .AI.
    Your idea about the ability to copy from Flash to Illustrator
    is a good idea although Illustrator can not read some of the Flash
    imported information correctly. But it is still a good enahcement
    idea. There is a link where you can add suggestions but I do not
    remember it and I am replying using mobile, so my browsing
    capabilities is limited.
    I will try to post the link here when I got to my back normal
    connection
    Thanks alot!!

  • Copy/Paste Frames in New Layer Un-Synching from Guide

    I recently upgraded to CS4 from Flash MX 2004, and I'm experiencing a problem with something I've literally been doing for years in Flash. What I do is copy/paste keyframed animation from one layer into a new empty layer. I then trim the animation as necessary, insert a new key frame, and repeat this action over many layers. In all my previous Flash version experience (think back to Flash 4 I've been doing this), the animation pastes perfectly into the new empty layer. This allows me to fill a street map of roads with arrows down a stretch of road that repeat perfectly over a 8 frame animation.
    What's different is in CS4, once I paste in the animation into the new layer, it un-synchs from the motion guide. I then have to manually re-synch, or attach, it to the guide.
    I need for this NOT to happen. Is there a setting or preference some where I am not seeing that prevents the un-synching from happening? I don't understand why CS4 would be different in this regard to the previous versions of Flash I've had experience with.
    Thanks for your time.

    A friend who has worked for me in Flash doing what I do and is now in school has informed me that guides in CS4 are no longer used, that they want you to use motion tweens instead, so the guides are difficult to use now, and as she put it "They found a better way to do motion so they want you to use the new way". She also informed me that this not the case in CS3, and that you can save your CS4 file as a CS3 file and use the guides normally without buggy behavior.
    She also confirmed that what I do in Flash can't be done, or rather is just grossly ineffective and time consuming, with motion tweens.
    If Adobe is reading this, I for one would sincerely appreciate it if you un-did the buggy behavior of guides, and reinstate the code in CS4 to allow us to continue using guides normally.
    Thank you.

  • Copy/paste error in Illustrator CC 2014?

    Anyone experiencing any copy/paste behavior in AI CC 2014? When I copy objects from one Illustrator file and paste them into another, I get double the objects onto the canvas (from 2, 4, from 3, 6, etc.) ... and I do not have a trembling set of digits that causes my to paste multiple times in a millisecond. This only happens "here and there" BUT often enough to have me asking you all. Thank you.

    si-bone,
    You may try the list.
    The following is a general list of things you may try when the issue is not in a specific file (you may have tried/done some of them already); 1) and 2) are the easy ones for temporary strangenesses, and 3) and 4) are specifically aimed at possibly corrupt preferences); 5) is a list in itself, and 6) is the last resort.
    1) Close down Illy and open again;
    2) Restart the computer (you may do that up to 3 times);
    3) Close down Illy and press Ctrl+Alt+Shift/Cmd+Option+Shift during startup (easy but irreversible);
    4) Move the folder (follow the link with that name) with Illy closed (more tedious but also more thorough and reversible);
    5) Look through and try out the relevant among the Other options (follow the link with that name, Item 7) is a list of usual suspects among other applications that may disturb and confuse Illy, Item 15) applies to CC, CS6, and maybe CS5);
    Even more seriously, you may:
    6) Uninstall, run the Cleaner Tool (if you have CS3/CS4/CS5/CS6/CC), and reinstall.
    http://www.adobe.com/support/contact/cscleanertool.html

  • [AS] Copy/Paste graphics

    Hi,
    Just wondering if anyone can help... l'm trying to copy/paste graphics from one document to another.
    I've been doing this my getting the file path of item link of graphic 1 and then setting this value to the frame on the other document - then setting the offset etc to move it to the correct place - which works great. (see below code)
    The problem l've got it sometimes the original graphic file doesn't exists so it does not work - what l want to do is then copy the 'preview' image you see on the document and paste that in the box on the other document - just like a normal copy/paste
    Any ideas on a nice way of doing this?
    This is my current copy/paste methods l talked about:
    on copyItem(boxName)
         try
         tell application "Adobe InDesign CS3"
              set myCopyDocument to active document
              set proceed to false
              tell myCopyDocument
                   set theSelection to graphic 1 of page item boxName
                   set theTarget to parent of theSelection
                   set FilePathOfImage to file path of item link of graphic 1 of theTarget
                   set {a, b, c, d} to geometric bounds of theSelection
                   set {w, x, y, z} to geometric bounds of theTarget
                   set xOff to a - w
                   set yOff to b - x
              end tell
              return {true, FilePathOfImage, xOff, yOff}
         end tell
         on error msg
              display dialog "Can not copy original image: " & msg
              return {false, "", 0, 0}
         end try
    end copyItem
    on pasteItem(boxName, FilePathOfImage, xOff, yOff)
         tell application "Adobe InDesign CS3"
          try
              tell myPasteDocument
                   set myImage to place FilePathOfImage on page item boxName
                   set {a, b, c, d} to geometric bounds of myImage
                   set geometric bounds of myImage to {a + xOff, b + yOff, c + xOff, d + yOff}
              end tell   
         on error msg
              display dialog "Can not place original image: " & msg
         end try
         end tell
    end pasteItem
    Regards, Gary.

    Worked out a way of doing it with the following:
    property myDocuments : {}
    set boxName to "pic1"
    tell application "Adobe InDesign CS3"
        -- Source
        set MyRectangles to page item boxName of document 1
        set MyRectangle to item 1 of MyRectangles
        set thePage to parent of MyRectangle
        set thePageNumber to name of thePage
        -- Target
        set MyTargetRectangles to page item boxName of document 2
        set MyTargetRectangle to item 1 of MyTargetRectangles
        set theTargetPage to parent of MyTargetRectangle
        set theTargetPageNumber to name of theTargetPage
        set {y, x, l, h} to geometric bounds of MyTargetRectangle
        -- Duplicate onto document 2
        set MyTargetRectangleCopy to duplicate MyRectangle to page theTargetPageNumber of document 2
        -- Delete old target
        delete MyTargetRectangle
        -- Move new target to old targets place
        move MyTargetRectangleCopy to {x, y}
    end tell

  • Illustrator copy/paste does not clear clipboard

    I am running OSX Yosemite, and latest version of Illustrator.
    I have a file, which has multiple artboards and symbols.
    When I am copying text and pasting it into another text placeholder, it pastes all text previously copied on the clipboard. So, first copy/paste works fine, but all the times after this include a lot of text from previous paste attempts. It looks like, Illustrator is not clearing the clipboard when copying text into it.
    Also, pasting in text from Mac TextEdit doesn't seem to work.
    This feels a lot like a bug, and really slows me down. Are there some sort of settings for the clipboard, or other ways to get rid of this feature?

    drawnworder,
    If no brighter solutions appear, you may try the list.
    The following is a general list of things you may try when the issue is not in a specific file (you may have tried/done some of them already); 1) and 2) are the easy ones for temporary strangenesses, and 3) and 4) are specifically aimed at possibly corrupt preferences); 5) is a list in itself, and 6) is the last resort.
    If possible/applicable, you should save current artwork first, of course.
    1) Close down Illy and open again;
    2) Restart the computer (you may do that up to at least 5 times);
    3) Close down Illy and press Ctrl+Alt+Shift/Cmd+Option+Shift during startup (easy but irreversible);
    4) Move the folder (follow the link with that name) with Illy closed (more tedious but also more thorough and reversible);
    5) Look through and try out the relevant among the Other options (follow the link with that name, Item 7) is a list of usual suspects among other applications that may disturb and confuse Illy, Item 15) applies to CC, CS6, and maybe CS5);
    Even more seriously, you may:
    6) Uninstall, run the Cleaner Tool (if you have CS3/CS4/CS5/CS6/CC), and reinstall.
    http://www.adobe.com/support/contact/cscleanertool.html

  • Copy paste into dock

    If someone could please help Firstly im a complete novice I have had my mac for just over a year and great with no problems until now when i copy text from a webpage and drop it onto the safari icon in the dock it no longer works very frustrated and i have also a issue regarding my email which when i try to get mail nothing happens is it possible to remove my email account and then reinstate it back to its original condition as i have a feeling i have altered settings Iwould be very gratefull any help.

    You can make the image a link. You can also select the image
    and draw
    areas on it to make an image map so that different parts of
    the image go to
    different links.
    Nancy Gill
    Adobe Community Expert
    Author: Dreamweaver 8 e-book for the DMX Zone
    Co-Author: Dreamweaver MX: Instant Troubleshooter (August,
    2003)
    Technical Editor: Dreamweaver CS3: The Missing Manual,
    DMX 2004: The Complete Reference, DMX 2004: A Beginner's
    Guide
    Mastering Macromedia Contribute
    Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP
    Web Development
    "senormejor" <[email protected]> wrote in
    message
    news:fa20sv$5ar$[email protected]..
    >i know you can copy / paste into dreamweaver, my question
    is are you able
    >to
    > create hyperlinks within the image from text on the
    image or set certain
    > regions within the image (such as images within the
    image) to create
    > hyperlinks
    > or is it just simply an image pasted into the website?
    >
    > i had a hard time trying to explain my question, but
    please ask any
    > questions
    > if i need to clarify more.
    >
    > thanks, im obviously a dw noob :>)
    >

Maybe you are looking for

  • Problem with the Display Driver

    Hi. I just got this message when I started Adobe Photoshop today, that's the CS4 edition, about that there was a problem with the Display driver: "Photoshop have encountered a problem with the display driver, and has temporarily disabled GPU enhancem

  • Secure pdf form sent by email

    I created a self-signed digital ID for both signature end data encryption. Then I created a pdf form by using livecycle and put it on our website, and after users fill it in, they will click submit by email to submit the data. I tried to create a sel

  • How to set up displaying all jsp-errors in the problems-list?

    how can i set up that all jsp-problems and warnings like "some tag does not have an end tag..." are displayed in the problem list? when i open up a jsp-page in the editor, the warnings are displayed i can´t see them in the problem list. in the older

  • Object autorization P_ABAP in RPAPRT09 for trx. PBA7

    Hello, I have problems with PBA7, this activating the authorization object P_ABAP in LRP, but in LRQ  doesn't, and the rol in LRP and LRQ is the same ones for the user.  The value that requires is (2) but the rol has the value (1).  The program is RP

  • Why does GarageBand crash every time I try to record a certain song.

    I have recorded many songs using the GarageBand app. However I've been trying to record a new one and every time I get just past the middle point, the app crashes. I reset it and am able to retrieve all my other songs but when I try to pull up the on