Help!

help using VBSCRIPT to send mail via Outlook

 
  

Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Interoperability RSS
Next:  Customize Outlook 2007 Calendar  
Author Message
Toc666



Joined: Aug 27, 2008
Posts: 1



PostPosted: Wed Aug 27, 2008 4:39 pm    Post subject: help using VBSCRIPT to send mail via Outlook

i'm using this script to automatically send a mail

Sub SendMailOutlook(aTo, Subject, TextBody, aFrom)

Dim Outlook 'As New Outlook.Application
Set Outlook = CreateObject("Outlook.Application")

Dim Message 'As Outlook.MailItem
Set Message = Outlook.CreateItem(olMailItem)
With Message
.Subject = Subject
.HTMLBody = TextBody
.Recipients.Add (aTo)
Const olOriginator = 0
.Send
End With
End Sub

i'm using the Active directory to send mail, the problem is when i enter a name to the Sub,
if the name (such as John) is common and has more then one match. the Sub breaks...

is there anyway to tell Outlook to open the name check (Ctrl + K) function?

thank in advance...
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Interoperability All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum