How to Add a Reference to the Microsoft Scripting Runtime Type Libraryby Bobson St. Pierre
VBA is the default programming language used in Microsoft Office and Visual Basic on Windows platforms. VBA Makes use of self-contained reusable code referred as Objects. Before VBA makes use of an Object, it first needs to establish a reference to that object. The Microsoft Scripting Runtime Object is no different from this rule. You can set a reference to the Microsoft Scripting Runtime by using the VBA programming environment.
Open Microsoft Word.
Go to "Tools," "Macro" and then click "Visual Basic." This opens the Visual Basic programming environment.
Go to "Tools" and click "References." This opens the References dialog box.
Scroll down the list and put a check next to "Microsoft Scripting Runtime." The following is an example of how to make use of the reference: Dim fsObject as Scripting.FileSystemObject Set fsObject =New FileSystemObject