Create / Send E-mails from Access

TimTDP

Registered User.
Local time
Today, 19:52
Joined
Oct 24, 2008
Messages
213
I currently use Windows 7 and Access 2000.
I use mapi to create / send e-mails. I also use Thunderbird as my e-mail client.
Mapi works for me, but I understand that I am about to run into problems with persons using Windows 7 and Outlook.

What is the alternative method to adopt to create / send e-mails from Access? I need a solution that will work from Windows XP / 7 and for most popular e-mail clients (Outlook, Thunderbird etc)
I prefer using ADO

If CDO, how can I get a copy of the e-mail sent to be saved in the "sent" folder of the e-mail client?

I also don't mind contributing to a solution, bearing in mind that I need to distribute the database to users in a non profit organisation. I am doing this database for them for free - as a communityservice.
 
Access provides a macro section and the macro section you can use send object. Have a look at teh eattached word document, it is using a form (bottom) part of page and the macro is indicated at the top, so the form has fields on it and are named.

See if this will help.
 

Attachments

Thanks Trevor

The problem with "send object" is that you can't add attachments
 
Here is an extract of what I have created when I need some one to request access to a development database I am working on

Sub sendForApproval()
'*************************************************
'VBA Code created by Trevor G November 2009
'Email trevorglover@wuit.co.uk
'*************************************************
Dim olApp As Outlook.Application
Dim olMail As MailItem
Set olApp = New Outlook.Application
Set olMail = olApp.CreateItem(olMailItem)
With olMail

.To = "name@goes.here" & ";" & "name2@goes.here"
.Subject = "Access Request"
.Body = "Please can you provide access to the COD system." & vbCr & vbCr & _
"The required details are as follows my First and Last Name is: " & vbCr & _
"My User ID is: " & vbCr & _
"My Computer Name is: "
.Display

End With
Set olMail = Nothing
Set olApp = Nothing
End Sub


I think if you just add the following it should work
.Attachments.Add "Path to the file you need to send"

 

Users who are viewing this thread

Back
Top Bottom