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ß TinoDie erweiterte Suchfunktion hilft dir, gezielt die besten Antworten zu finden
Suche nach den besten AntwortenEntdecke unsere meistgeklickten Beiträge in der Google Suche
Top 100 Threads jetzt ansehen