Object Browser
It is easy to be overwhelmed by the number of objects and what they do. It’s equally overwhelming when you realize the number of objects that might be available to your machine without your being aware of it.
Microsoft Office 97, 2000, and XP provide a powerful programming environment based on the Visual Basic for Applications language (similar to VBScript). Within this environment, there is an object browser, which allows you to browse objects installed on your system and investigate the methods and properties associated with them. You do not actually have to write any code to take advantage of the Object Browser.
Tip
If you aren’t familiar with the Visual Basic Environment, the Object Browser can be a little intimidating. See Learning Word Programming or Writing Excel Macros, both by Steve Roman (O’Reilly), for an introduction.
From either Microsoft Word or Excel:
Select Tools → Macro → Visual Basic Editor. This will start the VBA environment.
Select Tools → References. The dialog box shown in Figure 9-2 will appear.
Figure 9-2. Object References dialog box
Select the library
references you wish to use. The reference name for the WSH
Wscript
object is Microsoft Windows Script Host
Object Model, and the FileSystem object is Microsoft Scripting
Runtime.
Once you have selected the libraries you wish to reference, select the OK button.
Now press the F2 key. This will display ...
Get Windows XP in a Nutshell, Second Edition 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.