Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting FROM field in outlooko

Status
Not open for further replies.

tronc11

Instructor
Feb 29, 2004
3
0
0
AU
I have sorted out everything I need for sending emails to a list of people from an Access database, except setting the FROM: field in the outlook message. Can anyone point me in the right direction?

thanks
 
What mechanism are you using to generate the email?
 
NOt sure what you mean by mechanism, but I have included some of the code below - hopefully that will answer your question. this is all linked to a command button.

thanks

***********************************************
Set objOutlook = New Outlook.Application
Set objEmail = objOutlook.CreateItem(olMailItem)

' ***creates and sends email
With objEmail
.TO = EMailAddress
.Subject = "Course Reminder - " & CourseName
.Body = "Hi " & FirstName & Chr(13) & Chr(13) & _
"This is a reminder that your course - " & CourseName _
& " is starting at " & StartTime _
& " today" & Chr(13) & Chr(13) & _
"If you are unable to attend, please let us know as soon as possilbe" & Chr(13) & Chr(13) & _
"Thanks" & Chr(13) & Chr(13) & _
"Training People"
' .Send
.Display
.GetInspector.WindowState = olNormalWindow
 
So the code creates a MAPI session to the default profile on the computer running the code?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top