Microsift VBA Early vs. Late Binding Example

Private Sub Early_vs_Late_Binding_Example()
#Const LATEBINDING = False

    Dim objOutlook As Object
    Set objOutlook = CreateObject("Outlook.Application")
    ' NOTE! Early binding requires a typelib reference.  In the VBE click Tools -> References
    ' and make sure that "Microsoft Outlook xx.x Object Library" is selected
    Dim objOutlook As Outlook.Application
    Set objOutlook = New Outlook.Application
#End If
    Set objOutlook = Nothing
End Sub