Results 1 to 2 of 2
  1. #1
    2 Star Lounger
    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.

    Outlook 2003.


  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 28 Times in 28 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.
    Sub cmdMail_Click()
    Dim strTo As String
    Dim strSubject As String
    Dim strMessage As String
    strTo = ""
    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, _
    MessageText:=strMessage, EditMessage:=True
    End Sub
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts