Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sending E-mail with VB
Message
From
30/07/2003 15:41:02
 
 
To
30/07/2003 12:45:43
David Brunelle
Université de Sherbrooke
Sherbrooke, Quebec, Canada
General information
Forum:
Visual Basic
Category:
Other
Miscellaneous
Thread ID:
00814984
Message ID:
00815082
Views:
12
David:

You must select the Outlook object from your VB Project references
Public sub SendMail(tSubject As String, tBody As String) 

'***********************
'Description: Uses the outlook object to create and send a mail using the passed parameters of tsubject,tbody and tTo
'***********************

Dim oItem As Outlook.MailItem
Dim oitems As Items

Set oOutlook = New Outlook.Application
Set oitems = objInbox.Items
Set oItem = oOutlook.CreateItem(olMailItem)
'
With oItem
    .To = tTo
    .Body = tBody
    .Subject = tSubject
    .send
End With
HTH

>> Wes
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform