Results 1 to 4 of 4
  1. #1
    Tlo is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Jan 2016
    Posts
    41

    EmailDatabaseObject Automate TO Field

    I'm trying to email a form with the on click procedure of a button. I have built the "EmailDatabaseObject" macro within the on-click procedure, but am having difficulty with automating the TO field in the macro. The form is basically a punch list, and upon clicking this button I want the form to be emailed to the appropriate manager (i have labeled as "Assigned To" field on the form.) I have another field on the form that isn't visible that is the email address corresponding to the manager in the assigned to field. When I type =[Email] in the To field of the macro (Email is the name of the text box containing the email address) this is what i get in the to field when Outlook pops up: name@company.com#mailto:name@company.comHow can i get rid of the #mailto:name@company.com# portion of this?

    It's the correct email address that is populating, but the #mailto:# portion is preventing Outlook from sending.

    Please help!

  2. #2
    Tlo is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Jan 2016
    Posts
    41
    Any help? I was up till 2 am trying to figure this one out last night, any help is greatly appreciated!

  3. #3
    redbull's Avatar
    redbull is offline Competent Performer
    Windows XP Access 2010 32bit
    Join Date
    Mar 2012
    Location
    Missouri
    Posts
    480
    Code example? Email questions get asked all the time, but having an example will prompt some help.

  4. #4
    Tlo is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Jan 2016
    Posts
    41
    Here is the code:

    Private Sub Command23_Click()


    Dim vRecipient As String
    Dim vSubject As String
    Dim vMsg As String

    vRecipient = Me.Email
    vSubject = "You Have Been Assigned a New Issue"
    vMsg = "See attached for details."

    DoCmd.SendObject acSendForm, "frmIssue", acFormatPDF, vRecipient, , , vSubject, vMsg, True

    End Sub

    It rendered the same result as the emaildatabaseobject macro when I put in the TO field =[Email] (where Email is the name of the text box containing the email address).

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 03-26-2015, 10:59 AM
  2. Automate field after updating
    By BorderInfo in forum Forms
    Replies: 1
    Last Post: 02-02-2015, 10:53 PM
  3. EmailDatabaseObject in Macro
    By Kmoney in forum Programming
    Replies: 5
    Last Post: 01-13-2012, 03:14 PM
  4. Replies: 0
    Last Post: 03-15-2011, 07:35 AM
  5. Automate field in a table
    By Glyn in forum Database Design
    Replies: 1
    Last Post: 12-16-2009, 01:17 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums