kann ich irgendwie wenn ich ein datei öffne outlook per auto open öffnen lassen?
danke im voraus
Option Explicit
Private Sub Workbook_Open()
Dim oOutlook As Object
On Error Resume Next
Set oOutlook = GetObject(, "Outlook.Application")
On Error GoTo 0
If oOutlook Is Nothing Then
Application.ActivateMicrosoftApp xlMicrosoftMail
Else
MsgBox "Outlook schon offen"
End If
End Sub
Gruß TinoPrivate Sub Workbook_Open()
Dim oOutlook As Object
Dim myOlExps As Object, i As Integer
On Error Resume Next
Set oOutlook = GetObject(, "Outlook.Application")
On Error GoTo 0
If oOutlook Is Nothing Then
Shell Application.Path & "\OUTLOOK.EXE", vbMinimizedFocus
Else
Set myOlExps = oOutlook.Explorers
For i = 1 To myOlExps.Count
myOlExps.Item(i).WindowState = 1
Next i
MsgBox "Outlook schon offen"
End If
End Sub
Gruß Tino