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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sending Email from Access

Status
Not open for further replies.

JACD

Programmer
Aug 22, 2003
3
US
First off, how do I go about linking an Outlook 2000 Mailbox to an Access 2000 table?

Second, how do I get an Access 2000 table to send out an email message whenever a new record has been added to the table?

Any help is greatly appreciated.

Thank you.
 
in the code view ==>click references in the TOOLS menu==>add the references to Outlook

Dim outApp As Outlook.Application
Dim outMessage As Outlook.MailItem


'create outlook instance
Set outApp = CreateObject("Outlook.application")
Set outMessage = outApp.CreateItem(olMailItem)

'assign the message variables
With outMessage
.BCC = strBCC
.Subject = "Notice" & Me.NewsLetterDate.Value
.Body = Me.NewsLetter.Value
End With

'send the message
outMessage.Send

hth

Bastien

There are many ways to skin this cat,
but it still tastes like chicken
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top