|
|
Создание текстового файла и открытие его в Notepad
Dim objFSO As Object
Dim objTextFile As Object
Dim sFilePath As String, sCMD$
Dim lSuccess As Long
sFilePath = "D:\Temp\TestFile01.txt"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.CreateTextFile(sFilePath, True)
'objTextFile.Write "Печатайте тут!"
objTextFile.Close
DoEvents
sCMD = "Notepad.exe " & sFilePath
lSuccess = Shell(sCMD, vbNormalFocus)
Set objTextFile = Nothing
Set objFSO = Nothing
|
|