Fixed font Subject: Re: MAPIFolder/ActiveX Excel cannot find Outlook folder
Author: Andy Date: 06 Jul 2011
References: 1
I used some simpler code to see if Excel can find Outlook but still no
luck...

"Microsoft Outlook 12.0 Object Library" reference is ticked.

Sub OutlookTest()

On Error Resume Next
gOutlookApplication = GetObject(, "outlook.application")
If gOutlookApplication Is Nothing Then
Err.Clear
gOutlookApplication = CreateObject("Outlook.application")
End If
If gOutlookApplication Is Nothing Then
MsgBox ("Failed to connect" & _
vbCrLf & "error: " & Err.Description)
End If

End Sub

Any ideas?