Here is a little sub routine I use from my homepage to display recent topics. Just change the code inside the While Loop to write the info out to a file, rather than out to the screen.
CarKnee
<!-- #INCLUDE Virtual="/forums/inc_func_common.asp" -->
<%
Sub showRecent(intTop)
if intTop = "" Then intTop = 5
strConnString = 'copy your conn string here
set my_Conn = Server.CreateObject("ADODB.Connection")
my_Conn.Open strConnString
strSQL = "SELECT TOP 5 " _
& "MEMBERS.M_NAME, " _
& "FORUM.FORUM_ID, " _
& "FORUM.F_SUBJECT, " _
& "TOPICS.TOPIC_ID, " _
& "TOPICS.T_SUBJECT, " _
& "TOPICS.T_AUTHOR, " _
& "TOPICS.T_REPLIES, " _
& "TOPICS.T_DATE, " _
& "TOPICS.T_MESSAGE " _
& "FROM FORUM_TOPICS TOPICS, FORUM_FORUM FORUM, FORUM_MEMBERS MEMBERS " _
& "WHERE FORUM.F_PRIVATEFORUMS = 0 AND " _
& "TOPICS.FORUM_ID = FORUM.FORUM_ID AND " _
& "TOPICS.T_AUTHOR = MEMBERS.MEMBER_ID "
strSQL = strSQL & "ORDER BY TOPICS.T_LAST_POST DESC"
' "ORDER BY TOPICS.t_date desc"
set rsInfo = my_Conn.Execute (StrSql)
While NOT rsInfo.EOF
response.write "<b>" & rsInfo("t_subject") & "</b><BR>" & VbCrLf _
& "<font size=1>Posted by <B><a href='/forums/pop_profile.asp?mode=display&id=" & rsInfo("t_author") & "'>" _
& rsInfo("M_name") & "</a></b> on <b>" & chkDate(rsInfo("T_Date"), , False) & "</b> @ " & chkTime(rsInfo("T_Date"))& "<BR>" & VbCrLf _
& Left(rsInfo("t_message"), 150) & "...<br>" & VbCrLf _
& "[ <a href='/forums/link.asp?topic_id=" & rsInfo("TOPIC_ID") & "'>Read more</a> | <b>" & rsInfo("T_REPLIES") & "</b> reply(s) | <a href='/forums/link.asp?forum_id=" & rsInfo("FORUM_ID") & "'>" & rsInfo("F_SUBJECT") & "</a> ] <br></font><br>"
rsInfo.MoveNext
Wend
my_Conn.Close
Set my_Conn = Nothing
Set rsInfo = NOthing
End Sub