Code: Select all
Set olApp = CreateObject("Outlook.Application")
Code: Select all
Set olApp = CreateObject("Outlook.Application")
Code: Select all
Sub M_snb()
Application.ActivateMicrosoftApp 3
End Sub
Code: Select all
Sub M_snb()
Application.ActivateMicrosoftApp 3
with getobject(Outlook.Application,"")
' your code here
end with
End Sub
What I found myself when I Googled is this:CreateObject("Outlook.Application")
And that works!CreateObject("Outlook.Application.16")
Code: Select all
Sub Test()
Dim x As Object
On Error Resume Next
Set x = GetObject(, "Outlook.Application")
On Error GoTo 0
If x Is Nothing Then
Shell ("Outlook")
Set x = GetObject(, "Outlook.Application")
End If
End Sub