![]() Set f = fs.OpenTextFile("c:\testfile.txt", ForAppending, True, TristateFalse) Set fs = CreateObject("Scripting.FileSystemObject") The following code illustrates the use of the OpenTextFile method to open a file for appending text: Sub OpenTextFileTestĬonst ForReading = 1, ForWriting = 2, ForAppending = 8Ĭonst TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0 Opens the file by using the system default. The format argument can have any of the following settings: Constant Open a file and write to the end of the file. Use this mode to replace an existing file with new data. The iomode argument can have any of the following settings: Constant One of three Tristate values used to indicate the format of the opened file. ![]() The value is True if a new file is created False if it isn't created. Boolean value that indicates whether a new file can be created if the specified filename doesn't exist. Can be one of three constants: ForReading, ForWriting, or ForAppending. String expression that identifies the file to open. The OpenTextFile method has these parts: Part Opens a specified file and returns a TextStream object that can be used to read from, write to, or append to the file.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |