【发布时间】:2018-08-03 03:31:47
【问题描述】:
我使用以下代码将 .log(文本)文件的内容拉入 Notes 富文本字段,但如果数据量 > 64 KB,则会失败:
Dim io As Integer
Dim text As String
Dim fileSize As Single
io = Freefile
fileSize = 0
Open f For Input As io
fileSize = Filelen( f )
If (fileSize > 65536) Then
Msgbox "Sorry, but the file " + f + " is > 64KB and cannot be rendered in the default rich text field.",, "Can't continue"
Close #io
Exit Sub
End If
While Not(Eof(io))
Line Input #io, text
Call uid.FieldAppendText("RT1", text + Chr(13) + Chr(10))
Wend
Close #io
我检查文件大小以避免错误(这是一个段落不能超过 64KB 的抱怨)。那么如何添加多个段落,从而可以显示超过 64KB 的数据呢?
【问题讨论】: