export RTF as file?

Dave Cragg dcragg at lacscentre.co.uk
Thu Jan 20 06:00:02 EST 2005


On 20 Jan 2005, at 01:47, Chipp Walters wrote:

> I'm having problems with my RTF export.
> Can someone please try this and tell me if they get any results?
>
> create a new stack
> create a fld and type some text into it: "hello world"
> create a button with the script:
>
> on mouseUp
>     ask file "Save As:" with "Untitled.rtf"
>     if it is empty then exit to top
>     put it into tPath
>     put the rtfText of fld 1 into tContents
>     put tContents into URL ("file:" & tPath)
> end mouseUp
>
> Now, try and open the RTF file you just created. I'm getting nothing 
> in WordPad on XP. I don't have Word on this machine (hate M$).
>
I get the same result as you in Wordpad. (And the same if saved as 
"untitled.rtf".)

It opens fine in Open Office, and Notepad displays the full rtf stuff 
(as expected).

This doesn't square with Alex's report. Alex, do you have Word 
installed? Like Chipp, I don't. Does a Word installation add resources 
that are used by WordPad?

I've seen other oddities with WordPad and rtf. For example, copying 
text from a Rev field and pasting into WordPad shows rtf formatting 
code. Pasting the same into other programs produces the plain text 
only.

Dave



More information about the use-livecode mailing list