|
发表于 2020-6-10 12:00:02
|
显示全部楼层
用二进制方式打开的文件不能直接读入到字符串中,改一下
Dim fileContent As String
Dim b() As Byte
Open "d:\aaa\test.doc" For Binary As #1
ReDim b(LOF(1) - 1)
Get #1, , b
Close #1
fileContent = StrConv(b, vbUnicode)
Debug.Print Len(fileContent)
不过不知道这样读出来的东西有什么用? |
|