Question help with emailing from Access.. please!!!

charlottebath

New member
Local time
Today, 23:45
Joined
Aug 18, 2008
Messages
2
I am running office 2003 and I have only just starting doing my own coding. I have a new project looking at a memberships database that they want to send out invites to meetings. They want to do this by email and i have had a look at linking etc but my problem is more complicated than i first thought.

The administrator of the database wants to be able to email according to a number of variables in the database. Ie currently paid up, interested in smaller meetings, in a particular group. I have all of these coded and I am happy creating queries for the standard ones but the link to be able to send the email is where I get stuck.

Any advice would be great!:confused:

I am going on honeymoon in 11 working days and as usual they would like it done before i go away and tested!!!

thanks
 
In the simplest form.

If you want to produce a draft email with one or more email address pre populated then you could use the followhyperlink method. This will create a new email in your default email client.

Application.FollowHyperlink "Mailto:email@address.com"

You can then get you list of potential email recipients from a recordset and loop through them adding them to a string variable that you can associate like this:

Application.FollowHyperlink "Mailto:" & strTo

If you need more than that like add attachments, then you'll need to up the anti but there are plenty of examples on how to automate Outlook to do this.

Cheers,

Dan T
 
In our application, we have a feature that allows a user to send an email by Double Clicking a field containing an email address. The Code behind the Double Click event looks like the following:
Code:
Private Sub email_DblClick(Cancel As Integer)
On Error GoTo Err_Email_DblClick
    Dim stDocName As String
    Dim stDocSubj As String
    If Me.email <> "" Then
        stDocName = "Email"
        stDocSubj = "Email Being Sent to " & Me.Expr1
 
        DoCmd.SendObject acSendNoObject, stDocName, acFormatXLS, Me.email, , , stDocSubj, , True
    End If
Exit_Email_DblClick:
    Exit Sub
Err_Email_DblClick:
    MsgBox Err.Description
    Resume Exit_Email_DblClick
 
End Sub

Maybe this could also point you in the direction you want to go.
 

Users who are viewing this thread

Back
Top Bottom