

To use early binding, you first need to set a reference to the Outlook object library.
Set objOL = CreateObject("Outlook.Application") All Automation code must first define an Outlook Application object to be able to access any other Outlook objects. For example, the following code sets an object variable to the Outlook Application object, which is the highest-level object in the Outlook object model. Late binding uses either the Visual Basic GetObject function or the CreateObject function to initialize Outlook. To start an Outlook Automation session, you can use either early or late binding. The Outlook object model provides all of the functionality necessary to manipulate data that is stored in Outlook folders, and it provides the ability to control many aspects of the Outlook user interface (UI). Automation provides a standard method for one application to access the objects, methods, properties, and events of other applications that support Automation. Because Microsoft Outlook supports Automation, you can control Outlook from any program that is written with Microsoft Visual Basic.
