|
-
Oct 17th, 2001, 10:45 AM
#9
Thread Starter
Lively Member
I will just post it so others can use this as reference
if they run into the same problem......
this is outlook 2000 with a security message.
The code is being done in vb 6.0.
Dim olApp As Outlook.Application
Set olApp = CreateObject("outlook.application")
'Logon to outlook. open or not
Dim olns As Outlook.NameSpace
Set olns = olApp.GetNamespace("mapi")
olns.Logon
'Sends mail
Dim olMail As Outlook.MailItem
Set olMail = olApp.CreateItem(olMailItem)
olMail.To = "[email protected]"
olMail.Subject = "xxxxx"
olMail.Body = "test"
SendKeys vbKeyReturn, True
olMail.Send
Set olns = Nothing
Set olMail = Nothing
Set olApp = Nothing
When the security is set to med.
A message box pops up when execting olMail.send and
the program waits for an answer. So sendkey will not work
becasue the program is waiting and will not allow nothing to be executed until the message box is answered.
Thanks
again for the help.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|