B.2. Adding References to Your Projects
You know that you can automate Office applications by adding a reference to one of the libraries that comes with Microsoft Office, such as Microsoft Office 12.0 Object Library. Here are the steps necessary to add a reference, as well as what it means when you do:
Press ALT+F11 to open the Visual Basic Editor and select Tools References to display the References dialog box, shown in Figure B-1.
Figure B.1. Figure B-1
The Available References list includes items that have been registered to the Windows System Registry. To add one of these libraries to references for your project, check the box to the left of its name. When you close and reopen the References dialog box, any libraries you have checked are listed above all unselected libraries.
Many application installation packages handle registering libraries for you. If the library you want to use does not appear in the list of Available References, there are two ways to use the library:
Use the Browse button. Click the Browse button to open a file selection dialog box. Select the type of library you want from the drop-down list for Files Of Type. Browse to the folder that contains that library and select the library.
Register the library yourself. If the library is a 32-bit library (most are), ...
Get Access™ 2007 VBA Programmer's Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.