#End If Set olApp = CreateObject("Outlook.Application") 'Requires Ref to Microsoft Outlook XX.X Object Library #Const EarlyBind = False 'True = Use Early Binding ' None, I need to convert this into a proper function, but for right now I leave that ' Req'd Refs: Uses Late Binding, so none required ' Copyright : The following is release as Attribution-ShareAlike 4.0 International ' Purpose : Create a new Contact item in Outlook ' Author : Daniel Pineault, CARDA Consultants Inc. , vbOKOnly + vbCritical, "An Error has Occurred!" Resume Error_Handler_Exit Switch(Erl = 0, "", Erl 0, vbCrLf & "Line No: " & Erl) _ "Error Description: " & Err.Description & _ "Error Source: AddOlContact" & vbCrLf & _ "Error Number: " & Err.Number & vbCrLf & _ MsgBox "The following error has occurred" & vbCrLf & vbCrLf & _ On Error Resume Next If Not olContact Is Nothing Then Set olContact = Nothing If Not olApp Is Nothing Then Set olApp = Nothing Exit Function '.Display 'Uncomment if you wish the user to see the contact pop-up End With Set olContact = olApp.CreateItem(olContactItem) #End If Set olApp = CreateObject( "Outlook.Application") 'Late Binding Declaration/Constants Dim olApp As Object Dim olContact As Object #If EarlyBind = True Then 'Early Binding Declarations 'Requires Ref to Microsoft Outlook XX.X Object Library Dim oOutlook As Outlook.Application #Const EarlyBind = False 'True = Use Early Binding 'False = Use Late Binding
' Website : ' Purpose : Create a new Contact item in Outlook ' Copyright : The following is release as Attribution-ShareAlike 4.0 International ' (CC BY-SA 4.0) - ' Req'd Refs: Uses Late Binding, so none required ' ' Input Variables: ' ~~~~~~~~~~~~~~~~ ' None, I need to convert this into a proper function, but for right now I leave that ' to you. '- ' Procedure : AddOlContact ' Author : Daniel Pineault, CARDA Consultants Inc.