so how, does it create the file when it does not exist?
Per MSDN
object.OpenTextFile(filena
Arguments
object
Required. Object is always the name of a FileSystemObject.
filename
Required. String expression that identifies the file to open.
iomode
Optional. Can be one of three constants: ForReading, ForWriting, or ForAppending.
create
Optional. Boolean value that indicates whether a new file can be created if the specified filename doesn't exist. The value is True if a new file is created, False if it isn't created. If omitted, a new file isn't created.
format
Optional. One of three Tristate values used to indicate the format of the opened file. If omitted, the file is opened as ASCII.
Main Topics
Browse All Topics





by: HainKurtPosted on 2009-10-28 at 12:29:22ID: 25687222
on which line do you get this?
2nd or 4th, does file exists?
also third parameter is -2,-1 or 0
Constant
Value
Description
TristateUseDefault
-2 Opens the file using the system default.
TristateTrue
-1 Opens the file as Unicode.
TristateFalse
0 Opens the file as ASCII.
simplified your code...
Select allOpen in new window