Estou recebendo um erro: procedimento ou argumento inválido.
Set Fileout = fso.OpenTextFile(filePath, ForAppending, TristateFalse)
Você está passando TristateFalse
como argumento 3. Deve ser o argumento 4.
Por favor, leia a documentação.
Description
Opens a specified file and returns a TextStream object that can be used to read from or append to the file.
Syntax
object.OpenTextFile(filename[, iomode[, create[, format]]])
The OpenTextFile method has these parts:
Part Description
---- -----------
object Required. Always the name of a FileSystemObject.
filename Required. String expression that identifies the file to open.
iomode Optional. Indicates input/output mode. Can be one of two constants, either ForReading 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. The default is False.
format Optional. One of three Tristate values used to indicate the format of the opened file. If omitted, the file is opened as ASCII.
Source Método OpenTextFile