Call Close_outlook (see below for the vba of closing outlook if it is on)
Dim getOutlook As Outlook.Application
Dim getNamespace As Outlook.Namespace

Set getOutlook = New Outlook.Application
Set getNamespace = getOutlook.getNamespace("MAPI")
getNamespace.Logon "Approvisionnement@bnc.ca", , False (my code fails here ever since the server goes to icloud)

Dim objOutlook As Object, objnSpace As Object, objFolder As Object
Set objOutlook = CreateObject("Outlook.Application")
Set objnSpace = objOutlook.getNamespace("MAPI")

errors says: The server is not available. contact your administrator if this condition persists.
Seems my code doesn`t work because of icloud..








__________________________________________________
Sub Close_outlook()
Dim OL As Object
On Error Resume Next
Set OL = GetObject(, "Outlook.Application")
OL.Quit
End Sub
__________________________________________________