mikebaldam
Registered User.
- Local time
- Today, 11:34
- Joined
- Oct 29, 2002
- Messages
- 114
Hi,
I have an autoemail form, that emails fine for the email list, i.e. sending individual emails, but I want to add a REF link as a hyperlink in each of the message fields of the emails.
Currently I only get 1 message field Ref.
Not too hot on VB... so go easy...
Cheers in advance..
Mike
I have an autoemail form, that emails fine for the email list, i.e. sending individual emails, but I want to add a REF link as a hyperlink in each of the message fields of the emails.
Currently I only get 1 message field Ref.
Not too hot on VB... so go easy...
Cheers in advance..
Mike
Code:
Private Sub cmd55EmailAllDetails_Click()
Dim rsEmail As DAO.Recordset
Dim strEmail As String
Dim strRef As String
Dim strMessage As String
Set rsEmail = CurrentDb.OpenRecordset("qrySearchDistinctCustAllProps")
strRef = rsEmail.Fields("Ref").Value
strEmail = rsEmail.Fields("Email").Value
strMessage = "http://www.website.com/details.php?Ref=" & rsEmail.Fields("Ref").Value
rsEmail.MoveNext
Do While Not rsEmail.EOF
strEmail = strEmail & " ; " & rsEmail.Fields("Email").Value
strRef = "http://www.it4life.co.uk/other/TT/fdetails.php?Ref=" & rsEmail.Fields("Ref").Value
rsEmail.MoveNext
Loop
DoCmd.SendObject , , , , , strEmail, "Terry Thomas Estate Agents - Proprerty Updates", strRef, False, False
Set rsEmail = Nothing
MsgBox "The emails are in your emails Outbox and will be sent automatically during the next send recieve"
End Sub