本帖最后由 apang 于 2013-5-11 19:28 编辑
- strFileName = "d:\test.txt"
- Set ws = CreateObject("WScript.Shell")
- Set fso = CreateObject("Scripting.FileSystemObject")
- Set file = fso.OpenTextFile(strFileName,1)
-
- ws.Run "G:\nircmd.exe clipboard set "&chr(34)&file.ReadLine&chr(34),,True
-
- Do Until file.AtEndOfStream
- str = str & file.ReadLine & vbCrLf
- Loop
-
- file.close
- fso.OpenTextFile(strFileName,2).Write str
- MsgBox "OK"
复制代码
|