Sending Email Via MS Access

C

Confused_Dave

Hi,

I've built a fault log database and want it to send an email to staff
members once the fault has been resolved. The only problem i'm having is that
the school where i work use's outlook web access and i only know how to write
code to use outlook express.

Can anyone help?

Here's my code so far:

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 = "(e-mail address removed)"
'strSubject = "Fault resolved"
'strBody = "This is a test"


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

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top