Results 1 to 2 of 2
2008-02-15, 01:54 #1
- Join Date
- Sep 2002
- Thanked 0 Times in 0 Posts
Export Current Record to Outlook email (2003 SP2)
Whats the best way to:
1. Select Current Record in an access Form .
2. Send the record in TXT version (or HTML, RTF.etc) to Outlook
3. If possible, place it in the body of the message. If not, an Attachment will do....
So I have a simple Helpdesk DB and I want to be able to place a button in the main Form of the helpDesk ticket. This button will select the record and paste it to a new Email. A bonus would be if I can pre-populate the email address as well.
2008-02-15, 02:15 #2
- Join Date
- Mar 2002
- Thanked 29 Times in 29 Posts
Re: Export Current Record to Outlook email (2003 SP2)
Do you need to send a large number of fields? If not, the following example could serve as a template. You should adapt it to your situation, of course.
Dim strTo As String
Dim strSubject As String
Dim strMessage As String
strTo = "firstname.lastname@example.org"
strSubject = "Helpdesk ticket"
strMessage = "Dear " & Me.UserName & ", " & vbCrLf & _
"Helpdesk ticket: " & Me.TicketNo & vbCrLf & _
"Incident: " & Me.Incident & vbCrLf & _
"Date: " & Date
DoCmd.SendObject To:=strTo, Subject:=strSubject, _
The message will be displayed so that the user can edit it before sending it. If you want to send it without inspecting it first, use EditMessage:=False.