I discussed using the FileSystemObject(Scripting Runtime library) for working with folders
in an earlier section of this chapter; you can also use the FileSystemObjectto work with files
in a folder, or create files. One possible use is to select a file from a folder to store in a new
Attachment data type field in an Access table.
FIGURE 9.16
A form with an attachment field, showing a stored Word 2007 document.
To add an attachment, just double-click the field; this opens the Attachments dialog (shown in
Figure 9.17), where you can view existing attachments (multiple attachments can be stored in one
Attachment field), or add a new one by clicking the Add button.
FIGURE 9.17
The Attachment dialog, showing a stored Word 2007 document.
The Add button in the Attachments dialog (shown in Figure 9.17) opens a Choose File dialog
(shown in Figure 9.18) where you can select a file to store in the Attachment field.
Part II Writing VBA Code to Exchange Data between Office Components