|
Files opened in binary mode cannot be directly read into the string, change it
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)
But I don’t know what is the use of such reading? |
|