how to write a field on a file keeping the text formatting intact

Mark Smith mark at maseurope.net
Mon May 7 07:56:54 EDT 2007


Ah, I see. I don't think Rev can export directly to Word format, but  
an alternative might be to export as rich text - use the RtfText  
instead of HtmlText - and then I'm pretty sure that Word can read the  
file with formatting intact.

Best,

Mark

On 7 May 2007, at 12:42, André.Bisseret wrote:

>
> Le 7 mai 07 à 13:30, Mark Smith a écrit :
>
>> André, you need to write the htmlText of the field to the file:
>>
>>
>>
>> set the defaultFolder to specialFolderPath("desktop") & "/IMPORT"  
>> -- with file "thisFile.doc" in "IMPORT
>> open file "ThisFile.doc" for write
>> write the HTMLText of fld "thisField" to file "suchFile.doc"
>> close file "suchFile.doc"
>>
>> Best,
>>
>> Mark
>
> Thanks Marc for your immediate answer ;
> I tried what you are suggesting but I did not obtain the formatted  
> text ; I obtained something like the following :
>
> <p>Un jour sur ses longs pieds</p>
> <p>Allait je ne sais où</p>
> <p><i>Le héron au long bec</i></p>
> <p>Emmanché d'un long cou</p>
> <p></p>
> <p>	Il côtoyait une rivière</p>
> <p>	<u>L'onde était transparente</u></p>
> <p>	Ainsi qu'au plus beau jour</p>
> <p>	Ma commère la carpe</p>
> <p>	Y FAISAIT MILLE TOURS</p>
> <p><font color="#FF0000">Avec le brochet son compère</font></p>
>
> What I would like is to obtain the formatted text (not the html  
> translation)
>
> Any idea ?
>
> Thanks a lot
>
> Best regards
> André
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list