Function IsOutlookInstalled() As Boolean Dim ret As Object On Error GoTo OutlErr Set ret = Application.VBE.ActiveVBProject.References.AddFromGuid _ ("{00062FFF-0000-0000-C000-000000000046}", 6, 0) IsOutlookInstalled = True GoTo ExitProperly OutlErr: 'No GUID present in Registry If Err.Number < 32812 Then IsOutlookInstalled = False End If 'The type library is already referenced If Err.Number = 32813 Then IsOutlookInstalled = True End If ExitProperly: On Error GoTo 0 Set ret = Nothing End Function