FileSystemObject (FSO)
The FileSystemObject (FSO) provides access to file system. It has different methods and properties. It returns TextStream object.
The FSO has following methods: BuildPath, CopyFile, CopyFolder, CreateFolder, CreateTextFile, DeleteFile, DeleteFolder, DriveExists, FileExists, FolderExists, GetAbsolutePathName, GetBaseName, GetDrive, GetDriveName, GetExtensionName, GetFile, GetFileName, GetFolder, GetParentFolderName, GetSpecialFolder, GetTempName, Move, MoveFile, MoveFolder, OpenAsTextStream, OpenTextFile, and WriteLine.
The FSO has following Properties: Drives, Name, Path, Size, and Type.
VBA Open Text Files using OpenTextFile method of file system object Let us see example in the following tutorial. Table of Contents: Objective Add Reference: Microsoft scripting Runtime VBA Open a Text File in Output Mode VBA Open a Text File in Notepad for Reading Using FSO Instructions to Run VBA Macro Code Other Useful …
VBA Open Text Files Read More »