W
WhytheQ
Hello All,
I use the following function in Excel to call outlook before creating
an email. Using Office 2010 I'm finding that even with the correct
setting in the Mail section of our Control Panel that if OL is not
running when the function runs then a window appears asking to Choose
Profile. I've tried commenting out the two marked lines below and it
all seems to run without asking for the profile - would it be logical
to assume that these two lines are connected with the application
asking for a profile ?
Any help much appreciated
Jason.
Private Function OpenOutlook()
On Error Resume Next
Set myOutApp = GetObject(, "Outlook.Application")
If Err.Number = 429 Then
Set myOutApp = CreateObject("Outlook.Application")
'possible offending code>>>>>>>>>>>
' Set myNS = myOutApp.GetNamespace("MAPI")
' myNS.Logon
'>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
End If
On Error GoTo 0
End Function 'OpenOutlook
I use the following function in Excel to call outlook before creating
an email. Using Office 2010 I'm finding that even with the correct
setting in the Mail section of our Control Panel that if OL is not
running when the function runs then a window appears asking to Choose
Profile. I've tried commenting out the two marked lines below and it
all seems to run without asking for the profile - would it be logical
to assume that these two lines are connected with the application
asking for a profile ?
Any help much appreciated
Jason.
Private Function OpenOutlook()
On Error Resume Next
Set myOutApp = GetObject(, "Outlook.Application")
If Err.Number = 429 Then
Set myOutApp = CreateObject("Outlook.Application")
'possible offending code>>>>>>>>>>>
' Set myNS = myOutApp.GetNamespace("MAPI")
' myNS.Logon
'>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
End If
On Error GoTo 0
End Function 'OpenOutlook