为什么VBA中get语句返回字符串为空?
Sub AAA()
dim filecontent as sting
Open "d:\aaa\激动网启动双门户战略.doc " For Binary As #1
Get #1, , filecontent
Close #1
End Sub
_____________________________________
返回的filecontent为空,但激动网启动双门户战略.doc中有肉容
[解决办法]
用二进制方式打开的文件不能直接读入到字符串中,改一下
Dim fileContent As String
Dim b() As Byte
Open "d:\aaa\激动网启动双门户战略.doc " For Binary As #1
ReDim b(LOF(1) - 1)
Get #1, , b
Close #1
fileContent = StrConv(b, vbUnicode)
Debug.Print Len(fileContent)
不过不知道这样读出来的东西有什么用?