I am building a word program.how do I put a save and open function in it?
Please help
in what format would you like to save?
To preserve formatting i would recommend HTML or RTF...
OK, you have a field 1 and you want to save its contents to a file on disk:
...
ask file "Your promt here :-)..."
if the result <> "cancel" then
## 1. save as HTML
put the htmltext of fld 1 into url("file:" & it & ".html")
## or 2. save as RTF
## put the rtftext of fld 1 into url("file:" & it & ".rtf")
end if
...To get a file into your field do this:
answer file "Select a file or *#&&0%..." with filter "*.html"
## WINDOWS ONLY, will only show files with that suffix
## or use: with filter "*rtf"
## will only show RTF-files...
if the result <> "cancel" then
## 1. open HTML
set the htmltext of fld 1 to url("file:" & it) ## or 2. open RTF
## set the rtftext of fld 1 to url("file:" & it)
end ifHope that helps...
From Michael Miner
Regards
Klaus Major [EMAIL PROTECTED] www.major-k.de
_______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
