P
Paul
I have Outlook 2002. My E-mail Server is Microsoft
Exchange 2000. Now, I am running this VBA code in a module
in Excel 2002. Now, from my understanding this code is
suppose to automatically start Outlook, log into Exchange,
and Send my E-mail. However, I am always prompted for my E-
mail password, which I don't want to happen. What am I
doing wrong? How can I correct this problem? I must be
missing something. Any information would be great.
Thank You
Paul
Sub AutoLogon()
Dim OL As Object
Dim MailItem As Object
Set OL = CreateObject("Outlook.Application")
Set MailItem = OL.CreateItem(olMailItem)
Set myOlApp = CreateObject("Outlook.Application")
Set myNameSpace = myOlApp.GetNameSpace("MAPI")
myNameSpace.Logon "Profile Name", "Password", False, True
MailItem.To = "Pspeziali"
MailItem.Subject = "Paul's Test"
MailItem.Body = "This is a Test"
MailItem.Display
MailItem.Send
Set MailItem = Nothing
Set OL = Nothing
End Sub
Exchange 2000. Now, I am running this VBA code in a module
in Excel 2002. Now, from my understanding this code is
suppose to automatically start Outlook, log into Exchange,
and Send my E-mail. However, I am always prompted for my E-
mail password, which I don't want to happen. What am I
doing wrong? How can I correct this problem? I must be
missing something. Any information would be great.
Thank You
Paul
Sub AutoLogon()
Dim OL As Object
Dim MailItem As Object
Set OL = CreateObject("Outlook.Application")
Set MailItem = OL.CreateItem(olMailItem)
Set myOlApp = CreateObject("Outlook.Application")
Set myNameSpace = myOlApp.GetNameSpace("MAPI")
myNameSpace.Logon "Profile Name", "Password", False, True
MailItem.To = "Pspeziali"
MailItem.Subject = "Paul's Test"
MailItem.Body = "This is a Test"
MailItem.Display
MailItem.Send
Set MailItem = Nothing
Set OL = Nothing
End Sub