text的比较简单,html你要自己转换格式了。
open "c:\rec.txt" for output as #1
     do until rs.eof
        print #1,字段一,字段二,字段三,字段四.......
        rs.movenext
     loop
close #1html格式,多了一些
<html>
<head><title></title></head>
<body>
内容
</body>
</html>
当然,如果你不需要这些也无所谓,但如果你想要效果好一些,至少要有Table还用刚才的例子
open "c:\rec.txt" for output as #1
     print #,"<html>"
     print #,"<head>"
     print #,"<title>例子</title>"
     print #,"</head>"
     print #,"<body>"
     print #,"<table border=1 cellpadding=1 cellspacing=1 align=center width=100%>"
          do until rs.eof
        print #1,"<tr>"
        for i=0 to rs.fields.count-1
            print #1,"<td>" & rs(i) & "</td>"
        next
        print #1,"</tr>"
        rs.movenext
     loop     print #,"</table>"     print #,"</body>"
     print #,"</html>"
close #1