Keep the text formatting when writing new file with FILEIO

Hi all

I wonder if there is a way to keep the formatting of the text when I write it in a new file using FILEIO. In particular, I have the following text in a domain member:

test < background = L1_garaz / > (text in the tag a color and itsbold) test


I use the following code to write the foregoing in a new filw using FILEIO:

on mouseup


Annot = member("annotator").text
path = the moviepath & "Annotated_text\".
whichanno = baGetFilename ('Save', ' "& path &" "," "," doc files | ") * .doc", 0, -2, 0, 0, 'save the doc file')

myanott = new (xtra "FileIO")

myanott. CreateFile (whichanno) - create
myanott.openFile(whichanno,0)
writeString(myanott,annot) - write the new string
myanott.closeFile)
myanott = CANCEL

end

the problem is that despite the type of file I want to choose to save it (.doc, txt, etc.), he refuses to save the text with its original formatting (with the colors and the words "BOLD"). No idea how to solve this problem?

Use a member of text instead of a field member, then you can access the formatting of the text through property .rtf... then save this info to a file:
Annot = member("annotator").rtf
.....
...
writeString(myanott,annot) - write the new string

Quote:
Posted by: wgb14
NOP, its said property found rtf. So if saving to RTF (without change to the ownership of the member("annotator") still once he will not keep the main text formmat

Quote:
In particular, I have the following text in a domain member:

Tags: Director

Similar Questions

  • Keep the text format when replacing text

    Hi - I'm updating in indesign pages with 100 + boxes of text block containing prices / Cup/etc (not all threaded together, each thread is homogeneous). I need to replace the contents of these boxes with new content, but every time I put the new text, she brings with her fitness and I have to select everything and re - format text imported to the text format it replaced. I'm pulling my text in xls and converting it to plain text in text editing before placing it in my page layouts. I've never had this problem before and can not know if I messed up a preference or what. Previously, when I placed the new text, it took on the formatting of whatever it replaced. I work in CS5.

    Thank you!

    Looks like you're looking for "paste without formatting."

    This can be found in Edition > paste without formatting or with the shortcut Shift + Cmd (Ctrl) + V.

  • How keep the structure layers when you import files?

    When I copy and paste a piece of another PDF file or HAVE, the layers were always reoganized. Most gone sublayer include their names, resulting in several layers and less organized. Same thing happens when I use the command "Set" to import a file. Is there a way to keep the structure of the layer when importing files? Sorry for my poor English skill. Thank you.

    layers.JPG

    Bluesky,

    In palette dialog box layers, layers of dough remembers is checked? If not, check it and see what happens.

  • Keep the text formatting by using dynamic text...

    Hello

    I try to keep the format of a text I wrote in Word or InDesign CS4 using a dynamic text field (multiline)...

    So far, I have unsuccessfully...  Does anyone have any suggestions?

    Thanks in advance,

    GGour

    Unfortunately, you can not paste html formatting in textfields.  While you can format the textfield itself for font, size, color and other features, html formatting must be affected by the code, and Flash supports only a limited number of html tags.

  • Server data store will automatically get updated when the new file (with the same name) is placed in the landing area


    Hi guys,.

    The data store server-side will get automatically updated when a new file with the same name is loaded in the landing area?

    for example

    1 data store created for server-side get the file named UK.xls (he has 5 rows)

    2 snapshot created for the above data store

    3. created with the snapshot process

    After that if I remove 2 lines from the same file and load again to the landing (with the same name). So by re-running the process will take the last file OR do I need to reload the file in the data store every time when there is a change in the file. We also tried with option to work but the last file was not picking up.

    Any help will be really appreciated.

    Please lets us know your updates.

    Please advice

    Thank you

    VT

    Hello

    When you create a snapshot, you create a snapshot whose task (provided that you use a data store server-side) can be run from a job. To refresh the data, run the snapshot in a job task. If you create a task at the time the snapshot and the processes that use it, they will automatically connect and will be 'upstream' data through the snapshot in the process. You can then choose whether it would be appropriate to write the snapshot or not (for the effectiveness of performance if you want to do the straight through processing) by activating or deactivating the bucket of data staged that the snapshot written to. The snapshot in the work task means that the data is refreshed.

    For the work of design to the Director, you can refresh the snapshot by running again it manually in the context menu.

    Kind regards

    Mike

  • action with the new file with the size of the selection

    Hello

    I try to record an action that takes a copy of the image and creates a new file with the same dimensions. The action record always have the size of the file of the new hardcoded image inside. I tried to put the Preset in the Clipboard, but this is not recorded in the action. It is with the CS3 version.

    How can I create a new file that takes into account the size of the image?

    Thanks for your help,

    Daniel

    You can save the menu 'Image-duplicate"to make a copy of the entire image without registration of the size. If the doc doesn't have only one layer, you can also save the context menu in the layer panel to duplicate the layer to a new document. The size is not saved.

  • Keep the layer names when describing the text

    I would like to know if there is a way to keep the names of the objects/layers of text when the text is converted to text outline, using scripts.

    I create files with dozens of text layers (player names on the back of the jerseys of sport) and send the .ai file to manufacturers. This means that I have to expose the text, but when I do, the layers all lose their names and everything becomes "< Group >.

    Can anyone think of a way of naming these layers with the text they contain?

    Hi openbracket,.

    It is impossible, if the text is underlined.

    But it is possible for the text and the outline of the text via script (don't forget that the selected text is only filled with no effects or stroke)

    You can try something like this:

    // required: an opened document with one selected text frame
    var aDoc = app.activeDocument;
    var aSel = aDoc.selection;
    if (aSel[0].typename =="TextFrame") {
        if (aSel[0].characters.length < 40) {
        var newName = aSel[0].contents;
        } else {
        newName = aSel[0].contents.substr(0, 39);
        }
    aSel[0].createOutline();
    aSel = aDoc.selection;
    // name of the new Group = contents or part of contents of selected text frame
    aSel[0].name = newName;
    }
    

    Have fun

  • I created a custom and registered with a specific name date format. However, when I open a new worksheet, my saved format does not display in the menu drop-down? Am hoping that I don't need to create the same format for each new sheet?

    I created a custom and registered with a specific name date format. However, when I open a new worksheet, my saved format does not appear in the menu drop-down? Am hoping that I don't need to create the same format for each new sheet?

    You must save the spreadsheet containing the new date as a model format and use this custom template for each new spreadsheet where you want that this date format personalized at your disposal.

  • My iMessage keeps sending text messages when I want to send the iMessages iPhone how do I convert it back

    My iMessage keeps sending text messages when I want to send the iMessages iPhone how do I convert it back

    Go to settings > Messages and make sure that iMessage is activated. iMessage will only send with other iOS devices. The iPhone will send SMS if you send to non - iOS devices. You must also make sure that you have given to lit and it is connected to the Wi - Fi or cellular data.

  • Keep the text perpendicular to the base line when you use the string.

    Is there a way to keep the text perpendicular to the base line when using the warp function?  I'm trying to reproduce a decal with curved text.  When I use the string to get the text that is curved like the original, the letters are slightly tilted.

    You could try to make each letter on a separate text layer, then use Image > transform > free transform to adapt the letters in place.

    A lot more control over the placement of the letter and size that warp text offers.

  • How to get the text formatting in the tables

    Dear experts and aid

    For my project, I import an RTF file and then read the data into 3 tables. It works fine when just using the contents of the string of paragraphs. However, the final script should be able to read and to replace the text formatted...
    Why use intermediate tables? Because otherwise I need to swap between two fm-documents (and you can be a part of the book).

    The imported file starts with a certain number of lines separated into two parts by a TAB ("designates a TAB in \x08 FM)
    [[Garneau, 1990 #12]]    »   [9]
    The good article can also be locally as text, e.g. [9]
    Then follow the same (or smaller) number of paragraphs with text formatted like this:
    [9]"D. Garneau, ed., National Language Support Reference Manual (national language Information Design Guide. Toronto, CDN: IBM National Language technical Centre, 1990.

    Is it possible to replace in the body of the function below the next song

      while(pgf.ObjectValid()) {
        pgfText = GetText (pgf, newDoc);
        gaBibliography.push(pgfText);
        pgf = pgf.NextPgfInFlow;
      }
    

    with this

      while(pgf.ObjectValid()) { 
        gaBibliography.push(pgf);
        pgf = pgf.NextPgfInFlow;
      }
    

    Do I need a special statement of the gaBibliography range?
    And how to get the right part of the lines as formatted intro thingy in table gaFmtCitsFmt ?

    Currently, I read in the tables as "strings" (function GetText not shown):

    var gaFmtCitsRaw  = [];                           // left column in processed RTF
    var gaFmtCitsFmt  = [];                           // right column in processed RTF
    var gaBibliography= [];                           // bibliography lines from processed RTF
    // filename is something like E:\_DDDprojects\FM+EN-escript\FM-testfiles\BibFM-collected-IEEE.rtf 
    
    function ReadFileRTF (fileName) {
      var nCits=0, nBib = 0, openParams, openReturnParams, newDoc, pgf, pgfText ;
      var TAB = String.fromCharCode(8);               // FM has wrong ASCI for TAB
      var parts = [];
      
      openParams = GetOpenDefaultParams();
      openReturnParams =  new PropVals();  
      newDoc = Open (fileName, openParams, openReturnParams);  
      pgf = newDoc.MainFlowInDoc.FirstTextFrameInFlow.FirstPgf;  // get first pgf in flow
    
    // --- read the temp/formatted citations  
      while(pgf.ObjectValid()) {
        pgfText = GetText (pgf, newDoc);
        if (pgfText.substring (0,2) == "[[") {        // citation lines start with [[
          parts = pgfText.split(TAB);                 // get the two parts of the line
          gaFmtCitsRaw.push (parts[0]);               // Push the result onto the global array
          gaFmtCitsFmt.push (parts[1]);
          pgf = pgf.NextPgfInFlow;
        } else { break }
      }
    
    // --- read the bibliography
      while(pgf.ObjectValid()) {                      // until end of doc
        pgfText = GetText (pgf, newDoc);
        gaBibliography.push(pgfText);
        pgf = pgf.NextPgfInFlow;
      }
      newDoc.Close (Constants.FF_CLOSE_MODIFIED);
    } // --- end ReadFileRTF
    

    The following questions will then be how to change the script of FindAndReplace of Ian Proudfoot for managing text formatted as replacement. I will need to use the copy and paste IMHO...

    Klaus, okay, before pasting, you must assign the TextSelection object at your insertion point.

    // Add a new paragraph after the current paragraph.
    var newPgf = oDoc.NewSeriesPgf (lastPgf);
    var textRange = new TextRange (new TextLoc (newPgf, 0), new TextLoc (newPgf, 0));
    
    oDoc.TextSelection = textRange;
    oDoc.Paste ();
    

    -Rick

  • When I create a new file with 500px wide by long 500px it appears on my screen like a rectangle.

    When I create a new file with 500px wide by long 500px it appears on my screen like a rectangle. When I go to Image > Image size it still shows the 500 x 500 image and yet is clearly not a square. This also occurs if I try to create a circle, select the ellipse a tool by checking the box so he could make a perfect circle it appears as an oval.

    I have Photoshop CS6 on a macbook.

    Any help would be appreciated, I consider myself decently well informed in Photoshop and I looked in the settings, but I can't seem to understand the issue, happened for awhile now, it is not something unique stroke of luck.

    Thank you.

    Is your on-site pixel aspect ration? Set here the 500 x 500 pixels of image 2:1 format

  • Photoshop cs6 shifts when creating new file

    When creating a file the program is lagging about 4 to 7 seconds, when I save the file and re - open, there is no lag, at the opening of the older files is no this lag as well. When looking at the CPU usage, it seems to choke when creating new files. Does anyone have the same problem? I've updated photoshop and all my drivers. My system below features:

    Windows 10

    I7 - 4790 k

    GTZ 780

    16 GB of ram

    OK, figured out, this is the plugin extensis font management, I update that I have to leave for now, but now the system is back and catchy as usual, thanks to all.

  • HOW TO KEEP THE TEXT AT THE BOTTOM OF PAGE BY USING JAVASCRIPT-RESPONDED

    UPDATE 12/05/2006: CODE MORE COMPATIBLE:
    Used OnRequestEnd.cfm to load the info from the copyright at the bottom of each page, but the size of the varied settings page and copyright law appears at various points on the different pages. Didn't look well. Could not use tables to align the text of exit reasons. Coded way using CSS and JavaScript to keep the text at the bottom of each page. Be careful with CFFORM, we define the attribute ' wMode = transparent "in CFFORM this text exceeds the shape. Tested in IE and Netscape. Put at the end of individual models or inside the OnRequestEnd.cfm - enjoy!

    (css goes in your external css file, or between local style tags)
    . Copyright {background-color: #d8d8d8; color: Black; do-size: 10px; do-family: Arial; width: 10 0%; text-align: center ;}}
    Body {border-bottom-width: 0px ;}}


    (following goes to end of page or OnRequestEnd.cfm)
    < span id = 'x' class = 'copyright' >
    my copyright
    </span >

    <!-*-> LINE COPYRIGHT GUARD ABSOLUTE BOTTOM OF EACH PAGE
    < script >
    If (document. Body.ScrollHeight < document. Body.ClientHeight) {}
    var s = 0;
    document.getElementById('x').style.cssText ='position: absolute; bottom:'+ s + ';';
    }
    else {}
    var s = document.body.scrollHeight;
    document.getElementById('x').style.cssText ='position: absolute; top:'+ s + ';';
    }
    < /script >

    UPDATE 12/05/2006: CODE MORE COMPATIBLE:
    Used OnRequestEnd.cfm to load the info from the copyright at the bottom of each page, but the size of the varied settings page and copyright law appears at various points on the different pages. Didn't look well. Could not use tables to align the text of exit reasons. Coded way using CSS and JavaScript to keep the text at the bottom of each page. Be careful with CFFORM, we define the attribute ' wMode = transparent "in CFFORM this text exceeds the shape. Tested in IE and Netscape. Put at the end of individual models or inside the OnRequestEnd.cfm - enjoy!

    (css goes in your external css file, or between local style tags)
    . Copyright {background-color: #d8d8d8; color: Black; do-size: 10px; do-family: Arial; width: 10 0%; text-align: center ;}}
    Body {border-bottom-width: 0px ;}}

    (following goes to end of page or OnRequestEnd.cfm)

    my copyright


  • images don't "move with the text" correctly when I have several columns

    I use 2 columns, have been inserting images in my text and chose 'move with the text' but when I have to go back and fix something, or add text over the images all move and do not stay with the text.  They start on their knees and move to the other columns and will not stay with the text.  In my view, this has to do with the use of columns, does anyone have any suggestions?

    What version explicit pages (Pages: pages) and the Apple logo: about this Mac) operating system version are you using? There are different, a functional version of the Pages that are running on the current releases of OS X and guessing will not help you.

Maybe you are looking for