Working with Text Files

Disk files are often used to store text, and as an Office developer you'll probably find yourself needing to read and write text files on a regular basis. When it comes to text files, VBA gives you two choices. You can use the traditional methods, more specifically the sequential file type that was covered earlier in this chapter. Or, you can use the newer object-oriented file commands. In this part of the chapter, I will show you how to use the object-oriented file system, as well as provide some specifics for using sequential files for text.

Object-Oriented Text File Manipulation

To use object-oriented methods to work with text files, you always start with the FileSystemObject class, usually referred to as FSO. This ...

Get Office® XP Development with VBA now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.