How can i copy line with text and image to ms word

When I insert an image in textflow using InlineGraphicElement it works, but when I copy the line with the image to MS Word it copies only the text (not the image).
How can i copy the image to MS Word?

If you want copy formatted text and image to MS Word, you need to give MS Word rtf markup, because Word can recognize rtf markup but not TLF markup.
So you need to create a custom clipboard to paste a rtf markup. It's a large feature for you, because you need a tlf-rtf converter in your custom clipboard.
TLF Custom Clipboard Example:
package
    import flash.display.Sprite;
    import flash.desktop.ClipboardFormats;
    import flashx.textLayout.container.ContainerController;
    import flashx.textLayout.conversion.ITextImporter;
    import flashx.textLayout.conversion.TextConverter;
    import flashx.textLayout.edit.EditManager;
    import flashx.textLayout.elements.*;
    import flashx.undo.UndoManager;
    // Example code to install a custom clipboard format. This one installs at the front of the list (overriding all later formats)
    // and adds a handler for plain text that strips out all consonants (everything except aeiou).
    public class CustomClipboardFormat extends Sprite
        public function CustomClipboardFormat()
            var textFlow:TextFlow = setup();
            TextConverter.addFormatAt(0, "vowelsOnly_extraList", VowelsOnlyImporter, AdditionalListExporter, "air:text" /* it's a converter for cliboard */);
        private const markup:String = '<TextFlow whiteSpaceCollapse="preserve" version="2.0.0" xmlns="http://ns.adobe.com/textLayout/2008"><p><span color=\"0x00ff00\">Anything you paste will have all consonants removed.</span></p></TextFlow>';
        private function setup():TextFlow
            var importer:ITextImporter = TextConverter.getImporter(TextConverter.TEXT_LAYOUT_FORMAT);
            var textFlow:TextFlow = importer.importToFlow(markup);
            textFlow.flowComposer.addController(new ContainerController(this,500,200));
            textFlow.interactionManager = new EditManager(new UndoManager());
            textFlow.flowComposer.updateAllControllers();
            return textFlow;
import flashx.textLayout.conversion.ITextExporter;
import flashx.textLayout.conversion.ConverterBase;
import flashx.textLayout.conversion.ITextImporter;
import flashx.textLayout.conversion.TextConverter;
import flashx.textLayout.elements.IConfiguration;
import flashx.textLayout.elements.TextFlow;
class VowelsOnlyImporter extends ConverterBase implements ITextImporter
    protected var _config:IConfiguration = null;
    /** Constructor */
    public function VowelsOnlyImporter()
        super();
    public function importToFlow(source:Object):TextFlow
        if (source is String)
            var firstChar:String = (source as String).charAt(0);
            firstChar = firstChar.toLowerCase();
            // This filter only applies if the first character is a vowel
            if (firstChar == 'a' || firstChar == 'i' || firstChar == 'e' || firstChar == 'o' || firstChar == 'u')
                var pattern:RegExp = /([b-df-hj-np-tv-z])*/g;
                source = source.replace(pattern, "");
                var importer:ITextImporter = TextConverter.getImporter(TextConverter.PLAIN_TEXT_FORMAT);
                importer.useClipboardAnnotations = this.useClipboardAnnotations;
                importer.configuration = _config;
                return importer.importToFlow(source);
        return null;
    public function get configuration():IConfiguration
        return _config;
    public function set configuration(value:IConfiguration):void
        _config = value;
import flashx.textLayout.elements.ParagraphElement;
import flashx.textLayout.elements.SpanElement;
import flashx.textLayout.elements.ListElement;
import flashx.textLayout.elements.ListItemElement;
class AdditionalListExporter extends ConverterBase implements ITextExporter
    /** Constructor */
    public function AdditionalListExporter()   
        super();
    public function export(source:TextFlow, conversionType:String):Object
        if (source is TextFlow)
            source.getChildAt(source.numChildren - 1).setStyle(MERGE_TO_NEXT_ON_PASTE, false);
            var list:ListElement = new ListElement();
            var item1:ListItemElement = new ListItemElement();
            var item2:ListItemElement = new ListItemElement();
            var para1:ParagraphElement = new ParagraphElement();
            var para2:ParagraphElement = new ParagraphElement();
            var span1:SpanElement = new SpanElement();
            span1.text = "ab";
            var span2:SpanElement = new SpanElement();
            span2.text = "cd";
            list.addChild(item1);
            list.addChild(item2);
            item1.addChild(para1);
            para1.addChild(span1);
            item2.addChild(para2);
            para2.addChild(span2);
            source.addChild(list);
            var exporter:ITextExporter = TextConverter.getExporter(TextConverter.TEXT_LAYOUT_FORMAT);
            exporter.useClipboardAnnotations = this.useClipboardAnnotations;
            return exporter.export(source, conversionType);   
        return null;

Similar Messages

  • How to send an SMS with text and image

    I'm trying to add a photo and text to an SMS but can't add anything in the body of the SMS. What do I need to do?

    Hi Joe,
    Yeah, that's been the method I've been testing with. Is there a way for AIR to access the Intent API?
    Android code:
    final Intent i = new Intent(Intent.ACTION_SEND);
    i.putExtra("sms_body", msgText);
    i.putExtra(Intent.EXTRA_STREAM, imageUri);
    i.setType("*/*");
    startActivity(i);
    Thanks

  • How can I fix this? Text and images collide, space and margins are not taking into account. The whole page layout is a mess.

    Hi,
    Whatever I design in muse is totally different from what the preview in the browser shows. Texts crashed with images, and spaces and margins are not taken into account,
    Is there a way to fix this? Is it a bug?
    Thanks.

    Hi Federico,
    Please take a look at this forum post for a similar discussion : Aligning multiple HTML objects on one page?
    Regards,
    Aish

  • How can I start anew with Photos and clear the (minimal) stuff it has uploaded

    I've about had it up to here with this new Photos scheme. I reorganised my Aperture libraries on both my iMac and MBA in preparation for this, delayed turning Photos on for a couple of days until I thought everything was ready based upon the limited advice that was out there, and then got stuck in an endless loop of "uploading" and "preparing" every time I opened Photos. There are 19,975 images in my Aperture library on the iMac. I was stuck at Uploading at anywhere between that number and 19,000 with no progress after hours of waiting. I tried all the tricks mentioned here including re booting, restarting the app, repairing/rebuilding the database, killing the "cloudd" process, etc.today Today when I restarted Photos, it now said I had 23,775 images to upload- 4000
    more than I have-and of course it got stuck there, like it has for the last week.
    I copied the previous Aperture library (pre Photos migration)back to my iMac and opened it in Aperture. Thankfully, all the photos I had taken on my iPhone this week during this Photos clusterphuck transition were in the Aperture Stream so I didn't lose any of those. I'm willing to give this whole thing one more shot. So  i need some advice. How can I start anew with Photos and clear the (minimal) stuff it has uploaded (about 6000 of 19,000 images in the last 7 days) ? If I simply delete the Photos.photolibrary file will that do the trick and lt me start a new fresh library using?
    <Re-Titled By Host>

    How can I start anew with Photos and clear the (minimal) stuff it has uploaded (about 6000 of 19,000 images in the last 7 days) ? If I simply delete the Photos.photolibrary file will that do the trick and lt me start a new fresh library using?
    It is hard to say from your post, why the migration did not succeed in your case.
    by "stuck on upload" do you mean, you opened the Aperture library in Photos, and Photos converted it to a Photo Library, and then the upload to iCloud Photo Library did hang?  Or did already the upgrade to the Photo Library fail?
    If you want the Aperture library to upload to iCloud Photo Library, it needs to be on a disk formatted MacOS Extended (Journaled) and the original image files must not be referenced. Referenced originals will not upload.
    Also, the upload may hang, if you do not have enough free iCloud storage, orr if one of the videos or photos in your library is in an unsupported format or corrupted.
    To start over, try to repair and rebuild the Aperture library before opening it in Photos. Try all Aperture Library First Aid options - starting with repairing the permissions.  (Repairing and Rebuilding Your Aperture Library: Aperture 3 User Manual)
    If I simply delete the Photos.photolibrary file will that do the trick and lt me start a new fresh library using?
    You will have to delete the photos that are already in icloud too; otherwise you are risking duplicates.
    Can you launch Photos at all?  If yes, delete all photos in Photos and empty the Recently Deleted album. Wait for the deletion to sync to iCloud. Then delete the Photos.photolibrary.

  • How can I copy songs with metadata (added in iTunes) from my PC to my new iMac?

    I have iTunes 12.0.1 on my Windows PC. I'm about to get a new iMac (hooray!) and I'm beginning the process of transferring everything on my PC to my Mac. I've got all the documents, pictures, files, etc. covered, but now I have to make a copy of all of my music.
    Most of the music in my iTunes library is not bought through the iTunes Store (I download most of my songs from the Internet). Then, after saving the downloaded song to my computer, I go into iTunes on my computer and add the song. I also add metadata like artist, album, genre, album artwork, etc. to the song in iTunes. What concerns me is that only the songs in iTunes have this metadata: the original downloaded files I saved onto my computer don't have any metadata.
    I really don't want to have to go through the long and tedious process of adding artist/album names, genre, etc. to every single song in my iTunes library on my new iMac. How can I copy songs with metadata (added in iTunes) from my PC to my new iMac?
    Thank you so much for any help!

    Hello! I'd like to learn more about Home Sharing. To do this, would both my PC (which I hope to get rid of) and my new iMac need to be plugged in?
    Also, after Home Sharing with the old PC is initiated, I understand that all my songs would appear on my iMac. Is there a way to copy all of these (with album artwork, name, artist, etc.) directly to the iMac's hard drive and then disconnect home sharing so I can get rid of my PC?
    Thank you!

  • TS2755 Does anyone know why: when using Messages on my iPad, a cannot send a message with only text on it? Strange though, I can send a message with text AND a photo??

    Does anyone know why, when using Messages on my iPad, a cannot send a message with only text on it? Strange though, I can send a message with text AND a photo??

    Hi Cass,
    If you are having issues with Messages on your iPad, you may find the following article helpful:
    iOS: Troubleshooting Messages
    http://support.apple.com/kb/ts2755
    Regards,
    - Brenden

  • When I duplicate or copy slides, my custom theme images turn into question marks.  Why, and how can I copy themes with slides?

    When I duplicate or copy slides, my custom theme images turn into big grey boxes with an 'x' through them and a question mark in the middle in their new destination.  When I go look at the master slides, I see that there are now two sets of masters, one for the my custom theme and a new one just like it, but with no images.
    How can I copy (or duplicate) my slides?

    OK, got it ...  the Power ON Factory reset procedures might have changed with GB ... 
    To get to a Factory reset using the Power up method:
    1.  Power Off phone
    2. Press & Hold the HOME Button
    3. Press and Hold the Power ON button.
    You come up to the Triangle with the Exclamation mark & android guy.
    Press BOTH the Up and Down Buttons at the same time.  This brings up the Blue menu of options.
    use the Up/Down arrows to scroll thru the choices. Press the POWER Button to Select the menu item you choose.
    You can harmlessly test this and just choose to Reboot without doing anything, just to see how it works in case you ever need to do this in the future.
    edit:  It was concluded in the test group that they changed this process to align it with the new DX2 as the camera button isn't hard-wired like it is in the DX. So likely they just wanted to make this process the same for both platforms.  At least it sounds like a good reason...

  • How can I copy file/folders from and to hard drives? How can I have two or more windows of explorer so that I can drag and drop from one hard drive to another?

    Hi,
    I am a new customer (purchased last week) of MacBookPro (latest) and its my first ever Apple laptop.
    I am almost lost to find the operating tools.
    1. How can I copy files from hard drive to computer and vis-a-versa?
    2. Only can browse one but how can I have two or more browses at the same time like in MS windows?
    3. No right click works on track pad?
    4. Is there application/ program compatible to MS office? If so how much and how can I purchase?
    5. Is there AutoCAD program that is compatible to MS Window AutoCAD? and if yes how much and how can I purchase?
    I will very much appreciate if you could email me the with the solution/answers please.
    Regards,
    Khagendra Limbu

    1) For some reason this happens once in a while with FAT32 enabled external harddrives. I have no idea why this happens but it most easily solved by reformatting the drive. First make sure you've copied everything from the external drive to your internal harddrive. You've done this earlier so I assume you know how to do this.
    Now the reformatting part. Open Finder and go to Applications. Look for the folder called "Utilities". Click on it. In it you find a program called "Disk Utility". Click on it. Now look for the external drive. You probably see two entries for the disk. Click on the one that contains the name of the drive NOT the one that describes the disk (Like for example 320.07 GB Samsung S2 Portable Media).
    Now you see four tabs in the righthand part of the window. They're called "First Aid", "Erase", "RAID" and "Restore". Click on "Erase". This opens the tab with (amongst others) a dropdownbox (Format) and a textbox (Name) . In the dropdownbox select "Mac OS Extended (Journaled). Take note! This selection disables usage of the drive with Windows PC's. If your goal is to share the drive with Windows PC's select the MS-DOS FAT option.
    Enter a label for the drive in the textbox Name. Now click on the button "Erase". This will format the drive.
    Now when it's done you can copy back all the items you've copied to your internal harddrive earlier.
    2) Opening two windows like Explorer on Windows is opening two Finder windows on the Mac. Simply click on the background. In the menubar you items like 'Finder", "File", "Edit", "View", et cetera. Click on "File" and "New Finder Window". Do this two times. Alternatively you can click on the background and press CMD-N two times.
    3) You can right click on the trackpad. This however depends on if you've enabled the feature in System Preferences. In the topmenubar click on the Apple icon and select "System Preferences". Now look for Trackpad in Hardware. Click on it. You see three tabs with the names "Point & Click", "Scroll & Zoom" and "More Gestures". Select "Point & Click" and look for "Secondary Click'. Make sure it is checked and make sure it has written "Click or tap with two fingers" written beneath "Secondary Click". When you're done exit System Preferences. Now select the background and tap with two fingers on the trackpad. This should open the contextuel menu with options like "New Folder", "Get Info" et cetera.

  • How can i copy a blank form and add it to the original?

    How can I copy a blank page of a form and add it to the original?

    So, if I want to fill in blanks on a form where I need to add more pages to fill history, what program do I need? In Adobe Reader, I can edit and fill in blanks, but I cannot duplicate more blank pages.

  • Will Adobe ExportPDF convert a pdf with text and images to docx ?

    I have tried to convert an adobe pdf, which includes text and images, to a docx file.  The Adobe ExportPDF has not been able to do it - comes back with many errors.

    Mostly it can do it, though you can't expect a precise match on the layout. What errors do you get?

  • How to make clipping mask with text and vector pattern?

    Hey there guys, any help would be greatly appreciated. Im making a logo for a client and am having a nightmare of a time trying to properly use the clipping masks in illustrator CS5. I copied and pasted the  logo I made behind itself with a different color just for a drop shadow-like effect. And now I'm trying to apply this diagonal line pattern I created over top the "shadow" I made to give it some texture.
    Here's an example of what I'm going for, only imagine the line pattern on the text instead of banner

    Eric,
    As I (mis)understand it, you can either keep the Type live (or outline it) and:
    1) Create one copy of the pattern for each Type object (this will give you the opportunity of having different(ly coloured) patterns;
    2) For each Type object, select the type object and one of the patterns and Object>Clipping Path>Make;
    or you can:
    1) Select both Type objects and Type>Create Outlines, then Object>Compound Path>Make;
    2) Select the compound object and the pattern and Object>Clipping Path>Make.

  • How can I print photo with text underneath?

    Hi, I'm trying to print pages of small images of my work - maybe nine to an A4 page - with the title of the work underneath each image. I can't see how to do this in iPhoto. If I export a medium image to a Word document, is this the way to do it? I don't have iLife or iWork. Thanks.

    To add to Terence's suggestion put your comments in the Description field for each photo (click on the blue "i" button at the bottom left) and then print a contact sheet with the option to include the Comments (and any other field) under each photo.
    Happy New Year

  • How Can I Calibrate Display With PhotoShop And HP printer

    I want to scan photos from Canon scanner, adjust the photos in PhotoShop CS 1, and print on an HP Photosmart 8250. Right now, the print is much more purple than what appears on the screen and the final print is even more purple even without making any PhotoShop adjustments and the image on the screen is more purple than the original scanned photo. How can I get all these components color registered? Thanks

    I got the info elsewhere. Thanks anyway

  • How Can I replace line in text file

    I have a text file like following format
    1
    bvhhk
    g1
    2
    bvgjvh
    g1
    3
    mmm,mvb
    g2
    I want to replace 2 nd line to " prasad" and after replacing it should be following format
    1
    prasad
    g1
    2
    bvgjvh
    g1
    3
    mmm,mvb
    g2
    I try above change using following code segment and it is not work.
    static void modifyEmployeeDetails(String file_name){
    try{
         InputStreamReader reader= new InputStreamReader(System.in);
         BufferedReader buff=new BufferedReader(reader);
         FileReader read=new FileReader(file_name);
         BufferedReader buffer=new BufferedReader(read);
         FileWriter w=new FileWriter(file_name,true);
         PrintWriter write = new PrintWriter(w);
         System.out.print("Employee No : ");
         String No=buff.readLine();
    boolean eof = false;
    while (!eof) {
    String tep=buffer.readLine();
    if(tep.equals(No)){
    eof = true;
    System.out.print("Name : ");
    temp=buff.readLine();
    System.out.println("No");
    write.println(temp);
    System.out.print("Group No : ");
    temp=buff.readLine();
    write.println(temp);
    }catch(Exception e){
    System.out.println(e);
    Please correct If it is wrong and help me as soon as possible
    Thank you...............

    hi,
    I have a different approach of the solution to your problem.
    suppose you have entries in your file without any extra line feed between each two entries.
    the following program entirely reads your data into a bean list, changes a specific bean attribute and writes it to your data source.
    (you should adapt it to your needs)
    import java.io.BufferedReader;
    import java.io.FileNotFoundException;
    import java.io.FileReader;
    import java.io.FileWriter;
    import java.io.IOException;
    import java.util.ArrayList;
    import java.util.List;
    public class FileReplace {
         public List<MyBean> readFile(BufferedReader in) throws IOException{
              String line;
              List<MyBean> beanList = new ArrayList<MyBean>();
              MyBean bean = null;
              int i=0;
              while((line=in.readLine())!=null){
                   if(line.trim().equals("***")){
                        beanList.add(bean);
                        i = 0;
                   }else{
                        switch (i) {
                        case 0:
                             bean = new MyBean();
                             bean.setAttribute1(line);
                             i++;
                             break;
                        case 1:
                             bean.setAttribute2(line);
                             i++;
                             break;
                        case 2:
                             bean.setAttribute3(line);
                             i++;
                             break;
                        default:
                             break;
              return beanList;
         public void writeToFile(List<MyBean> beanList, String outputFilePath) throws IOException{
              FileWriter out = new FileWriter(outputFilePath);
              for (int i = 0; i < beanList.size(); i++) {
                   out.write(beanList.get(i).toString());
              out.flush();
              out.close();
         public void test(){
              //BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
              String filePath = "D:/file.txt";
              try {
                   BufferedReader in = new BufferedReader(new FileReader(filePath));
                   //read data
                   List<MyBean> beanList = readFile(in);
                   // edit a bean attribute
                   beanList.get(0).setAttribute2("prasad");
                   //write beans back to file
                   writeToFile(beanList, filePath);
              } catch (FileNotFoundException e) {
                   e.printStackTrace(); //handle appropriately this exception
              } catch (IOException e) {
                   e.printStackTrace();//handle appropriately this exception
              }catch (Exception e) {
                   e.printStackTrace();//handle appropriately this exception
         class MyBean{
              String attribute1;
              String attribute2;
              String attribute3;
              public final static int ATTRS_NUMBER = 3;
              public String getAttribute1() {
                   return attribute1;
              public void setAttribute1(String attribute1) {
                   this.attribute1 = attribute1;
              public String getAttribute2() {
                   return attribute2;
              public void setAttribute2(String attribute2) {
                   this.attribute2 = attribute2;
              public String getAttribute3() {
                   return attribute3;
              public void setAttribute3(String attribute3) {
                   this.attribute3 = attribute3;
              @Override
              public String toString() {
                   return attribute1+"\n"+attribute2+"\n"+attribute3+"\n***\n";
         public static void main(String[] args) {
              FileReplace instance = new FileReplace();
              instance.test();
    }hope it helps

  • How can i work simultaniously with labVIEW and Excel ?

    Hello . I study engineering and need some help with labVIEW, and the connection to microsoft excel.

    Hi
    NI offers an "Report generation toolkit". You get some VI's with this toolkit and so you can directly create your reports from LV.
    Another possibility is the communication through ActiveX. There is a nice link with application notes and LV examples for that:
    http://zone.ni.com/devzone/devzone.nsf/webcategories/C3E56C69D399361E86256AB7006A9149?opendocument&node=DZ53003_US
    Regards,
    Luca

Maybe you are looking for

  • Voice memos from iPhone4 won't transfer to iTunes

    I cannot move the voice memos on my iPhone 4  into iTune (10.7).  I have recently upgraded to my operating system to Mountain Lion so that I can use iCloud, but this was happening before that. 

  • XI in the role Of FTP

    Hi all, i have to use XI in the role of FTP for move 27 files wich are located in the same system but in diferent folders, and also has to be placed by XI in the same target system in diferentes folders. The Way that I´m thinking is creating one scen

  • Leasing of Assets

    Hi I wanted to know how leasing are handled in FI (Assets Accounting) module. There is one tab in asset master for lease assets Here i have both the scenarios: Assets taken on lease and assets given on lease. Please let me know how these scenarios is

  • S.M.A.R.T. Statius failing 27' iMac

    Opened up disk utility today to repair disk permissions and the main 1TB ST3100........drive is in red. "This drive has a hardware problem that can't be repaired" " Back up data and replace disk" Is stated in the right window. S.M.A.R.T Status: In re

  • How do I upgrade iphoto 8.1.2 to 9.2 ? No path are clearly indicated to do this

    How do I upgrade from iphoto 8.1.2 to 9.2 ? No explanations and paths are clearly indicated on Apple. Thanks for your help.