
Sub TestOutlookOpened() If '(Da inserire il codice di verifica) Then Application.ActivateMicrosoftApp xlMicrosoftMail Else End If End Sub |
Dim olApp As Long Set olApp = GetObject(, "Outlook.Application") If Not olApp Is Nothing Then MsgBox "Attendi apertura Outlook" Application.ActivateMicrosoftApp xlMicrosoftMail Else End If |
On Error Resume Next Dim objOutlook As Outlook.Application Set objOutlook = GetObject(, "Outlook.Application") If Err.Number <> 429 Then MsgBox "Attendi apertura Outlook" Application.ActivateMicrosoftApp xlMicrosoftMai Else End If |
Dim oOutlook As Object On Error Resume Next Set oOutlook = GetObject(, "Outlook.Application") On Error GoTo 0 If oOutlook Is Nothing Then MsgBox "Apertura Outlook" Application.ActivateMicrosoftApp xlMicrosoftMail Else End If |
