By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,665 Members | 2,646 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,665 IT Pros & Developers. It's quick & easy.

Using MS Access to send Email

P: 2
I would like to send an email with MS Access 97.
In our bussiness with don't use MS outlook or MS outlook express.
Instead we use teamware.

Can anyone help me out with sharing his code on this issue.

Marc B
Aug 31 '06 #1
Share this Question
Share on Google+
2 Replies

P: 1
Create a command button on a form and paste the code below on the On Click event procedure...

Private Sub cmdEmail_Click()
Dim strToWhom As String
Dim strSubject As String
Dim strBody As String
Dim strMsgBody As String
Dim intSeeOutlook As Integer

strToWhom = InputBox("Enter recipient's e-mail address.")
strSubject = InputBox("Enter Subject.")
strBody = InputBox("Enter Text.")

'strToWhom = ""
'strSubject = "This is a test"
'strBody = "This is a test"

DoCmd.SendObject , , , strToWhom, , , strSubject, strBody, intSeeOutlook
x = MsgBox("Email has been sent")

End Sub
Sep 1 '06 #2

P: 2
Thanks for your reply.
I used the code you presented before.
However it doesn't work.
everytime I get the following error
Microsoft Access can't open the mail session.
Check your mail application to make sure it's working properly.
That was my problem in the beginning.
I am not using outlook instead I'm using TW Mail from teamware.
In the internet exporer I can't select this program to make this the default
program for my emails.
I will need some further assistance to get the program working.
Sep 4 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.