コメント |
@DIV
strValue = "この文字列を一括で、" & vbCrLf & "ファイルに書き込みます"
Set ws = WScript.CreateObject("WScript.Shell")
TempPath = ws.ExpandEnvironmentStrings("%TEMP%")
TempFile = TempPath & "\_.txt"
Set fso = WScript.CreateObject("Scripting.FileSystemObject")
on error resume next
Set objHandle = fso.CreateTextFile( TempFile, True )
if Err.Number <> 0 then
Wscript.Echo Err.Description
else
objHandle.Write( strValue )
objHandle.Close
end if
on error goto 0
@END |