Preserve Bold & Italics  while cut paste

hi,
I am trying to cut some text and paste into another location through scripting.  While pasting it,does'nt preserves the bold and
italic. All the text fall as a normal text only. Anybody tell me how to preserve the overrides(Bold and Italics) while pasting.
Thanks
Ranjan

@Ranjan – instead of "cut" and "paste" you could use the move() method of the texts object of your source text frame or your selection, if text ist selected.
See screenshot:
See my snippet with annotations:
//In InDesign CS5.5 you can use the click order in the UI to determine
//what selected object is [0] and [1] etc.
//if you select two objects, [0] is the first one, [1] the second one.
//So to move formatted text from the left to the right text frame
//first click on the left text frame, hold shift and click on the right one
//before executing this code:
var sel = app.selection;
sel[0].texts[0].move(LocationOptions.AFTER,sel[1].insertionPoints[0]);
More generally spoken:
sourceTextFrame.texts[0].move(LocationOptions.AFTER,targetTextFrame.insertionPoints[0]);
You could also move selected text to another insertionPoint:
app.selection[0].texts[0].move(LocationOptions.AFTER,targetTextFrame.insertionPoints[0]);
Uwe

Similar Messages

  • Suddenly I cant copy and paste copy/cut/paste is not available in Mozillia and firefox. Never seen this before

    I have never seen this before when I try to copy and paste, I get a
    "Copy/cut/ paste is not available in Mozilla and firefox. Do you want more information about this issue? "
    I have copied and pasted hundreds of times before with Mozilla and firefox . This just happened suddenly.
    when I go to find more information on this issue, it give a long drawn out explanation I cant follow.
    What happened?

    When you right-click the link, the page immediately tells you you can't copy, or does that occur after you choose Copy Link Location?
    If it appears immediately, you can switch a setting in Firefox that should prevent sites from blocking the normal right-click menu. Here's how you would do that:
    (1) In a new tab, type or paste '''about:config''' in the address bar and press Enter. Click the button promising to be careful.
    (2) In the search box above the list, type or paste '''context''' and pause while the list is filtered
    (3) Double-click the '''dom.event.contextmenu.enabled''' preference to switch it from true to false.
    This setting does have a complication: On Google Maps and other sites that have their own right-click menu, Firefox's menu then will block the site's menu. To clear Firefox's menu so you can access the site's menu tap either the Alt key or Esc key once (but sometimes Esc removes both).

  • PodCast Video Play causing XP CRASH during Cut/Paste in WINWORD

    I am experiencing serious compatibility issues while viewing a training PodCast with a separate WINWORD window running (taking notes).
    When I attempt to cut/paste a screen-shot of the presentation (while in pause mode), or almost any "picture" in the WINWORD or OneNotes window, I get a complete "lock-up CRASH." This happen AFTER I have resumed the video Pod-Cast and doe not typically happen DURING the "pause".
    To recover, I am forced to "Force POWER Down" by holding down my POWER-ON button.
    This is ugly.
    My only "work-around" has been to completely "pause" the video from streaming while I am doing ANY "pasting" or MOVING around images in the separate WINWORD screen. ANY moving around of images WHILE simultaneously viewing the video PodCast using iTunes almost immediately causes a complete LOCK-UP.

    what software did you use to burn your rss feed? if you used feed burner they will automaticly redirect the suscribers to the new feed. i hope this helped you
    check us out at
    www.thehistorypodcast.blogspot.com

  • Can't Cut & Paste In JavaScript Editor Window

    Can anyone help? Can't cut & paste inside JavaScript Editor Window.
    I'm using Windows XP Home Edition & Adobe Acrobat 8 Pro

    I've had this happen sometimes while having a JavaScript console window open. IT happens after I've had the console open and switched to another application. Then when I switch back to Acrobat, the console is unresponsive. The solution I found was to close the console and open it up again from the menu. Then it's back to working as expected.

  • Trouble using Cut & Paste function

    I am having trouble using any type of cut and paste function
    in Dreamweaver......I have tried using "ctrl c" and "ctrl v", have
    tried using right click mouse function with drop down menu for
    cutting and pasting, and using the edit (top bar) cut and paste
    functions. Nothing works.......it doesn't matter whether I cut and
    paste within Dreamweaver or whether I cut from a word document and
    paste into Dreamweaver. It just doesn't work. Any ideas on how to
    fix this issue? I understand this SHOULD be working.

    Did the problem just occur out of the blue? Was Cut &
    Paste working OK for
    a while? Can you think of anything you changed between when
    it worked and
    when it broke?
    See if this workaround solves the problem:
    Re-creating the Dreamweaver user configuration folder on
    Windows
    http://www.adobe.com/go/36bda422
    Please post back whether this solves it or not.
    Thanks,
    David Alcala
    Adobe Product Support

  • Unable to Cut & Paste

    I have followed instructions to allow Cut & Paste and created a user.js file in the correct directory. However I am still unable to Cut & Paste. I'm using SnippetMaster Pro.
    == User Agent ==
    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; MDDR; InfoPath.2)

    DUHHH no I do a lot more than that. I run a successful marketing and design business, and productivity is very important. While the mac has many features that speed me up it also has plenty to slow me down, like the lack of this very basic and primitive function that even DOS was able to run by typed commands since the 80's.
    All this BS about which computer is better or worse is just a load of crap. Every computer has pros and cons and it's like trying to compare male and female superiority. It doesn't exist. Since I can't return this anymore I guess I'll get used to dragging-and-dropping like a kindergarten kid.

  • Trying to create a shell script to cut/paste files in finder. Help needed.

    I'm trying to create an automator shell script to cut/paste. It'll function exactly like copy/paste. i.e. I'll just copy file/files with command+c like always, but then I'll create an automator which uses the "mv" terminal app to move the files which works exactly like cut paste.
    I need some help since I don't know the syntax for creating shell scripts.
    What I did so far is to do it in automator with Apple Script which goes like the following:
    on run {input, parameters}
    tell application "Finder"
    set theWindow to window 1
    set thePath to quoted form of (POSIX path of (target of theWindow as string))
    end tell
    tell application "Terminal"
    do script with command "mv \"" & input & "\"" & thePath in window 1
    end tell
    return input
    end run
    This gets the copied file path from clipboard before, as input, and then recognizes the active finder window as thePath so then executes the mv command for the input file to the thePath window.
    It doesn't work as expected since it connects both file/window paths into a single path instead of leaving a space between them so the mv command can't recognize two separate paths.
    What's the correct syntax for that line
    do script with command "mv \"" & input & "\"" & thePath in window 1
    to leave a space between input and thePath under the mv command?
    Also this requires the terminal app to be open in the background.
    After I get this to work I want to do the exact same thing using shell script within automator, so I won't need Terminal to be open all the time.
    And the next step will be to cut/paste multiple files/folders but that should be easy to do once I get the hang of it.

    Try using:
    on run {input, parameters}
    tell application "Finder"
    set theWindow to window 1
    set thePath to quoted form of (POSIX path of (target of theWindow as string))
    end tell
    do shell script "mv \"" & input & "\" " & thePath
    return input
    end run
    (45977)

  • How can I Cut & paste an address from one address book to another on my PC.

    My work computer has 3 address books - 1 personal address book, 2 collected address book, 3 work related address book.
    After a couple of years I would like to tidy up my address books & cut & paste some of them from here to there. However there seems to be no cut & paste or copy & paste feature that I can locate anywhere????
    I can't drag & drop an address from one to another either.
    Can anyone please help
    BevN

    Cut and paste a whole contacts information has never available because it entails different components. Cut/Copy and paste has always been available if you are only selecting one part of the information, but this means you have to open a specific contacts Properties.
    '''How to drag and drop contacts between address books:'''
    In the left Directory Pane, select the address book containing the contact you want to move. You should see a list of contacts in the right Contact Pane.
    Drag & Drop process:
    * Left click and hold down on a contact in the list to grab, then drag that contact to the left and hover over the address book where you want to put the contact. Then release the mouse button to drop into that address book.
    You can move more than one contact.
    * Hold down 'Ctrl' key and use mouse to select and highlight various contacts.
    * then use the D&D process - (left click, hold down on any highlighted contact to grab all highlighted contacts).

  • In iMovie 11, how can you cut/paste a clip that has subtitles and actually have the subtitles get cut/pasted. When I try, the subtitles disappear into the void and I have to do the subtitling all over again.

    In iMovie 11, how can you cut/paste a clip that has subtitles and actually have the subtitles get cut/pasted. When I try, the subtitles disappear into the void and I have to do the subtitling all over again.

    If you think this is a bug, you can report it here:
    Apple - Mac OS X - Feedback

  • Clicking on an email address on a webpage, opens outlook express, but does not create a new mail, which it used to. annoying as it then means cutting & pasting the details

    As I said above, clicking on an email address on a webpage, opens outlook express which is my default email client. In the past it used to also open a new mail, ready for me to type the message but now it does not. It works if I load internet explorer as the browser but does not in firefox. I prefer firefox, so can someone help me resolve this. Its so annoying to have to open a new mail then cut & paste the email details.

    I posted this reply elsewhere in the support forum but I'll copy it here for you, as follows....
    I had the same problem. Initially thought I needed a string (code) to run the "Create new e-mail" command for Outlook but I didn't. I did a few things that eventually made it work, but I don't know for certain which one it was so here goes.
    1.) Go to Control Panel and click on Internet Properties. Go to the Programs tab and double-check that Outlook Express is your default e-mail client. (This is probably for IE).
    2. Close Outlook Express. Select the RUN command from the Start Menu and type the following: <msimn /reg>. Only type the info between the brackets. Click the OK button and wait about 5 seconds. Nothing will happen on screen but the information is being silently written to the registry.
    3. Open Outlook Express and go to the Tools Menu. Select Options. On the General tab, look down to the Default Messaging Programs. More than likely, the top option will say that "This application is NOT the default Mail handler" Click the button next to it that says "Make Default". This should trigger an available option in Firefox, below, if it was not already available.
    4. In Firefox, go to the Tools menu. Select Options. Click on Applications. Under the column, "Content Type" look for the mailto function. In the column Action, select "Use Outlook Express (default)" if it is not already selected. "(default)" must be part of the phrase. Somehow there is code behind this option that will bring up a new e-mail in Outlook that otherwise does not work if Outlook is selected manually. (To choose Outlook manually, you will indeed have to find the string code somewhere.)

  • HP Officejet Pro 8500 - won't print bold italicized words

    Why won't my printer print out the words that are in bold italics on a pdf? It prints the non-italicized words in bold.

    Hi,
    Can you confirm that you have an Officejet 8500a or Officejet 8500? On the 8500a model, you can set the networks proxy address and port setting from the front panel of the printer (setup>Webservices setup>proxy). If you are unsure what your proxy settings are you'll need to contact your network admin. If your network uses a proxy users name and password for all devices, you need to enter this information along with the proxy address and port in the printers embedded web server. Type the products IP address into an internet brownser window (printer must be connected to the same network as PC). Select the network tab, and than look for the proxy settings option. Enter in the information and click apply. Once the networks proxy information has been correctly inputed into the embedded web server, try printing again. If unsuccessfully, you might try reinstalling the printer software after uninstalling it. Hope this helps!
    I was an HP employee
    Reminder: Please select the "Accept as Solution" button on the post that best answers your question. Also, you may select the "Kudos" button on any helpful post to give that person a quick thanks.

  • Unable to use all the feature of my email service (Juno on the web) like; font size/color, bolding, italics, highlighting etc why? Those features work through Internet Explorer but not Firefox.

    When I go to my Juno on the web through Firefox, I am unable to use the tool features such as:
    Font size / Color
    Bolding
    Italics
    Bullets
    Highlighting
    just to name a few. Yet when I bring it up through Internet Explorer these features work, plus the way Firefox reads my Juno the tabs are distorted (the page is not formatted correctly, I contacted Juno they said I should contact my modem company AT& T they said no so you are my last resort.. Please help resolve my issue, THANK YOU in advance for assisting with this matter.

    It is up to Juno to enable Midas, the Rich Text Editor which is built into Firefox, with one little line of code on every web page that has RTE for IE. There's nothing that you can do to turn that feature on your self, it has to be coded on each web page that has Rich Text Editing.
    http://www.mozilla.org/editor/midas-spec.html <br />
    http://kb.mozillazine.org/Midas
    Their ignorance probably lies with their staff programmers only knowing how to do it for IE ''(their training and certificates are probably from the Microsoft cabal)'', and not realizing that Gecko and WebKit apps each have their own Rich Text Editor's, which require their own small line of code to enable those Editor's.

  • , I-tunes can no longer 'locate' my library , after a botched cut & paste attempt to back-up onto an external drive. Still syncing with i-Pod but playlists lost , podcasts no longer syncing, Can't play music .. how to restore back to original state .

    I-tunes can no longer 'locate' my library , after a botched cut & paste attempt to back-up onto an external drive.Cant play any music as it "can't find" the library  Still syncing with i-Pod but playlists lost , podcasts no longer syncing.   How to restore back to original state . I have tried re-installing  - with no change

    I do the same thing as you do...
    My music is on an external drive as to not use up gigabytes of storage that need not be used for media.
    There are a couple basic principles to iTunes that I believe you should know.
    1. iTunes is not a media storage program. It does not store your media "in iTunes". It simply is an organization tool for your media already on a hard disk.
    2. As iTunes is not a storage mechanism, it has no way to "know" whether or not the media that is listed is actually there. This is where the "design" of iTunes comes into play.
    I like to think of iTunes as a bread-crumb trail. The "music" in iTunes, isn't actually there. The bread crumb is the location on the external hard drive.
    If that bread crumb trail disappears (in this case the external drive you use). If said external drive is not plugged in, that bread crumb trail is not able to be followed. iTunes is "lost" and unable to find the media. The only way to remedy this is to place the media on your local drive.
    To address your issue of the library. If you hold down shift, you can select your library on your external drive. It will be a file with an .itl extension. The folder name will be your external drive.
    I go into edit > preferences > advanced and set my library to the correct location. Make sure you check the box "Copy to iTunes Folder when importing" (or whatever it says).
    You can't fix the issue of iTunes not seeing the media if your drive is unplugged unless you physically move the content to your OS HDD...Or any other HDD you use.

  • Cut & paste no longer work in Safari with iOS 5

    I can't seem to cut & paste text in Safari under iOS 5.  Has that feature been removed?

    Since I attempted to sync this morning, I did not have a chance to troubleshoot more before work.
    I will try the following later:
    1) Turn off iDevice, restart PC, re-sync
    2) Turn off iDevice, uninstall iTunes, restart PC, re-sync
    3) Turn off iDevice, uninstall iTunes, restart PC, backup to iOS 5.0.1 & re-sync
    4) Return iPhone to Sprint for another one.

  • Cut/Paste from Word to Illustrator CS3 for Mac suddenly not working

    This issue regards Illustrator CS3 for Mac on a Mac Pro with 6 GB.
    Exactly one week ago I created a number of Illustrator files by cutting charts from a Word 2008 document and pasting them into an Illustrator document.
    In the past I have dragged the images (or clip art) or simply used Control-C or even Control-X, but by whatever method I opted for, getting the image from Word to Illustrator CS3 has not been a problem.
    Yesterday I got a new chart and a request to replace an old image - one that I had created last week on Tuesday by the Drag/Drop or Cut/Paste method.   For reasons I can't begin to imagine the process simply won't work now.
    I also find that if I simply select text in a Word Document, hit Ctrl-C and then try a Ctrl-V in Illustrator I don't get to see my text pasted in - ONLY if I already have a text block open and the cursor in place will I get to see the text copied over into Illustrator.  This is very strange and not at all how things have worked in the past - typically I would see the new Text Object just appear, and then I could move it to wherever I wanted. 
    I have opened up a number of old files that I know were created with copied text and also opened the associated Word files (earlier versions of Word) and again find that I can't copy text over, or even move images over - even though I clearly could do this before.  I have also tried entirely new files - also with no success.
    I was at an Apple one-to-one session this morning and they were more than mystified by this.  I can Cut and Paste into Adobe Photoshop Elements, but I can't even cut and paste from Adobe Photoshop Elements into Illustrator CS3.   I can drag the Photoshop file (from the Finder window) into the Illustrator document and poof - get my image that way, but it's as an image only.  If the base image in question is a vector image or something else having a plurality of elements, I can't then select the elements in Illustrator to change their color, delete them, or otherwise play with them.
    I have brought up a word document on another Mac system that also has Illustrator CS3 and find that it too can't drag/drop cut/paste between the two applications.   At Apple, we did confirm that such ability is operational in the new Illustrator CS4, but none of their store systems still have CS3 to provide yet a third system to test.
    I have deleted my Illustrator CS3 preferences, tried flushing the p-ram, and of course run fix and repair permissions - no dice.
    My Mac systems update daily and there is nothing in the main update log that shows anything for Adobe or Office (nor do I think there should be).  Adobe Update reports that everything is up to date, and I don't see a history file to know what might have changed in the last week.   Office also reports fully up to date and happy.
    As I can cut and paste the images into an email for Mail and into Photoshop, I am fairly certain that it is NOT a Microsoft Office 2008 issue.  The fact that another Mac with Illustrator CS3 also can't cut and paste suggests that is is really not something personal to my main system.
    It is almost as if this is some clandestine "update" intended to encourage me to buy Illustrator CS4.  Given that I bought Illustrator CS3 less than a year ago, I really am not eager to buy the new version.   The greeting on the Adobe Support page that CS3 is no longer the current version and therefore supported was most annoying.
    I am really hoping that someone out there has an idea of what to try changing, removing and/or adjusting with respect to Adobe Illustrator CS3.

    I tried the Select by Path option - can't believe I missed it - and found it made no difference.
    I actually uninstalled and reinstalled the whole app.  When I tried to simply re-install (can't remember it's exact phrase) it got part way through and then demanded another disk - but I only have one DVD with the application - the extra DVD is for tutorials and it didn't accept that one either.  So I restarted that process and chose to completely uninstall.  Then reinstalled - hey with only my one disk - gee, just like the first time.   And then it seemed to work.
    I was not aware of the save as PDF option - but yes I have Adobe Acrobat Pro 9 for Mac so that option is there - and it seems to work too.  
    There were of course a slue of updates, and I let them all proceed - but even with them all in place the system is fine and I can once again drag and drop / cut and paste things back and forth.   I just tried a text block and "The Quick Brown Fox" pasted in with a clipping mask about 10 times the size of the document, but other than that it was ok.  
    So I have things working again on my primary system.   Will try and figure out what's wrong with the other one - but a reinstall might be the easiest game there too.

Maybe you are looking for

  • Boot Camp Update and W7 Mode

    This is a new one on me. I was working in W7 and discovered after a time there was the familiar Apple s/w Update requester behind a few windows, It showed updates for Boot Camp - over 320 M and for Itunes and Quicktime. Problem is that it was not fea

  • I see video on TV with MEGA PC 180

    Hi, I've a MEGA PC 180. I've connect it to my TV but when I want to play video (DVD or AVI) I don't have anything in the video window and I can see every other thing on screen. Does someone can help me? Thirnanox

  • Request for C++ ExtractorProcessor code snippets

    Hi, Does anyone have any C++ code snippets of using the ExtractorProcessor? I'm trying to implement an ExtractorProcessor in C++ - I have created a ValueExtractor and I can create the ExtractorProcessor from that, but the compiler gives me an error w

  • New line problem in sending sms through SAP

    Hi all, I need to send sms through sap. I have a code working fine. constants: c_tab type c value cl_abap_char_utilities=>NEWLINE. concatenate 'Sales INFO-' date3  into line1 separated by space.   move 'Order Input' to line2.   concatenate 'Day: Rs.'

  • Whats the best solution for playing mp3?

    I looked around and there seem to be some solutions to play mp3 (javazoom, quicktime). What do you recommend? What are some disadvantages? Is there a good tutorial to a good class that enables playing mp3 somewhere (I didnt find one) ? thanx