LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 246
Default Outlook Code Run from Excel

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

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pasting from Excel to Outlook with VBA code spences10 Excel Programming 13 January 14th 07 09:36 AM
excel code tweak for outlook - confusing periro16[_2_] Excel Programming 5 August 18th 05 10:29 AM
How can I use Outlook express to send mail rather than Outlook by VBA code new.microsoft.com Excel Programming 5 August 3rd 05 03:45 PM
How can I use Outlook express to send mail rather than Outlook by VBA code new.microsoft.com Excel Programming 1 August 1st 05 12:45 PM
How to get rid of the warning msg from Outlook when sending email via VBA code in Excel Fredrik Wahlgren Excel Programming 0 April 14th 05 10:53 AM


All times are GMT +1. The time now is 09:56 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"