You can create the HTML file with the Open() function. When the file is there you can write to it as a txt file and just write the HTML stuff and the viewable content to the file with writeline().

For example:
Code:

Break on
;
$rc = open(1, "c:\somehtmlfile.html", 5)
;
$rc = writeline (1, "stuff here" + @crlf)
$rc = writeline (1, "more stuff here" + @crlf)
$rc = writeline (1, "even more stuff here" + @crlf)
;
$rc = close(1)

_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.