Working with Windows Explorer Folders

When you save documents (of any sort) to your computers hard drive, you need to specify the folder (otherwise everything will end up either in your root Documents folder or the current folder, making it very hard to find specific documents). If you work with Word, Excel, or Outlook templates, you also need to specify a templates folder, so your code will look in the right place for your templates. You can get the default user templates folder from the Word File Options dialog, but again, you probably don't want to keep all your templates in the root Templates folder.

To work with Windows folders, you have two options: the Office FileDialog object, or the FileSystemObject. These two methods are discussed in the following sections.

: j j'f^J-j The sample database for this chapter is Files and Folders.accdb.

0 0

Post a comment