How to Add an Object Library Reference in VBA

In Outlook VBA editor, if you desire to use the objects of other applications, such as Microsoft Excel or Word, you have to add the according object library references in the first place. This article will share you the concrete steps.

To start with, you could access the Outlook VBA editor either by pressing “Alt + F11” keys or clicking on the “Visual Basic” button in the “Developer” ribbon. Then, you can follow the steps below to establish the reference to your wanted objects. Here we take “Microsoft Excel Object Library” as an instance.

  1. In VBA editor window, click the “Tools” button in the menu bar.
  2. Then, from the drop down list, select the “References” option.Select "References" Option from "Tools" Drop Down List
  3. Subsequently, the “References – Project 1” dialog box will display.
  4. In this dialog box, you can pull the scrolling bar down until you locate what you want, such as “Microsoft Excel 14.0 Object Library”.Enable Your Wanted Object Library
  5. After that, mark the checkbox in front of this object.
  6. Finally, click “OK”.
  7. From now on, you have added the Excel object library reference successfully.
  8. Since then, you can make use of the objects in MS Excel at will.

You can follow the steps above to add the other object libraries as per your needs.

Author Introduction:

Shirley Zhang is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including corrupt mdf and outlook repair software products. For more information visit www.datanumen.com