Dim aa As FileSystemObject
Dim FileName As String
Dim nextline As String '一行文本内容
Dim fnum As Integer
Dim LineNum As Integer '行数
FileName = "c:\aaa.txt"
If aa.FileExists(FileName) Then
fnum = FreeFile()
Open FileName For Input As #fnum ' 打开输出文件。
LineNum = 0
While EOF(fnum) = False
Line Input #fnum, nextline
text1.text= nextline
MsgBox nextline
Wend
End If
filedata = ""
Open FileName For Input As #1
Do until EOF(1)
Line Input #1, strline
filedata = filedata + strline + vbCrLf
Loop
Close #1
text1 = filedata
FileName = CStr(FileName)
Open FileName For Input As #1
Line Input #1, Title
Line Input #1, classify
Line Input #1, publisher
Line Input #1, pdate
Line Input #1, edate
lcontent = ""
Do While Not EOF(1)
Line Input #1, strline
lcontent = lcontent + strline + vbCrLf
Loop
Close #1