Ich möchte automatisiert ein e-Mail verschicken.
Das klappt auch ohne Probleme.
Nun möchte ich aber voher prüfen, ob Outlook auch gestartet wurde...
Wie kann ich so etwas realisieren?
lg
Markus
Function GetOutlookApp() As Object
On Error Resume Next
Set GetOutlookApp = GetObject(, "Outlook.Application")
If Err.Number 0 Then
Set GetOutlookApp = CreateObject("Outlook.Application")
OutlookStart = True
End If
On Error GoTo 0
End Function
Sub Outlook_OK()
If OutlookStart = True Then
MsgBox "Outlook ok"
Else
MsgBox "Es muß der Verweis auf die Outlook-Library gesetzt werden"
Exit Sub
End If
End Sub