• Export Current Record to Outlook email (2003 SP2)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Export Current Record to Outlook email (2003 SP2)

    Author
    Topic
    #448620

    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.

    Thanks

    Viewing 0 reply threads
    Author
    Replies
    • #1097544

      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 = "you@somewhere.com"
      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.

    Viewing 0 reply threads
    Reply To: Export Current Record to Outlook email (2003 SP2)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: