Results 1 to 2 of 2
  1. #1
    Eranka is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Dec 2017
    Posts
    150

    Including A Signature To Email


    Hi Everyone

    Code:
    Dim ttle2 As StringDim CN2 As String
    Dim Email2 As String
    Dim JN2 As String
    Dim SN2 As String
    Dim rp2 As String
    Dim cd2 As String
    Dim ssql As String
    Dim rec As String
    Dim but As String
    Dim appOutlook As Object
    Dim objMailItem As Object
    Dim strOutputPath As String
    Dim strReportName As String
    Dim Lec As String
    Dim Pay As String
    Dim db As DAO.Database
    Dim rs As DAO.Recordset
    
    
    If IsNull(Text13) Then
    MsgBox ("Search Criteria Cannot Be Empty")
    Text13.SetFocus
    
    
    Else
    
    
    JN2 = Me.Text23.Value
    Email2 = Me.Text19.Value
    ttle2 = Me.Text25.Value
    CN2 = Me.Text26.Value
    SN2 = Me.Text28.Value
    rp2 = Me.Text29.Value
    cd2 = Me.Text30.Value
    
    
    Set appOutlook = CreateObject("Outlook.Application")
    Set objMailItem = appOutlook.CreateItem(0)  ' olMailItem
    
    
    With objMailItem
      .To = Me.Text19.Value 'InputBox(prompt, "Enter Email Address")
      .Subject = "Job Completion Confirmation For Job Number : " & Me.Text23
      .Body = "Dear " & ttle2 & "." & CN2 & vbNewLine & vbNewLine & "This is to inform that the repair of your console has been completed successfully and ready for pickup." & vbNewLine & vbNewLine & "Repair job detail are given below " & vbNewLine & vbNewLine & " 1.Customer Name : " & ttle2 & "." & CN2 & vbNewLine & vbNewLine & " 2.Job No : " & JN2 & vbNewLine & vbNewLine & " 3.Concole Serial Number : " & SN2 & vbNewLine & vbNewLine & " 4.Date Given for Repair (mm/dd/yyy) : " & cd2 & vbNewLine & vbNewLine & " 5.Payment To Be Made : " & rp2
      '.Attachments.Add strOutputPath
      .Close (0)  ' olSave
      .Display
    End With
    
    
    Set objMailItem = Nothing
    Set appOutlook = Nothing
    'rec = Forms![Navigation Form].Form![txtUser]
    'but = "Total Payment Report Email Button"
    'CurrentDb.Execute "INSERT INTO ActivityLog (User, Form_Name, Record_ID,Activity_Date,Activity_Time)" & " VALUES ('" & rec & "','" & but & "','" & Me.Combo1 & "',Now(),Now())"
    Text13.Value = Null
    Text19.Value = Null
    End If
    Above is the code i'm using to send an email to customer upon a button click. How can i add a signature to the email via a code. Where should i include. Hope you could help me out on this.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    8,834
    Use .BodyHtm (instead of .body) then insert the signature image.

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

Similar Threads

  1. Email Signature
    By DMT Dave in forum Programming
    Replies: 42
    Last Post: 05-29-2018, 02:03 PM
  2. Gmail signature with email address syntax error
    By Gina Maylone in forum Access
    Replies: 2
    Last Post: 01-26-2016, 07:41 AM
  3. Add Outlook Signature to Email - CODE
    By floyd in forum Programming
    Replies: 1
    Last Post: 11-27-2013, 09:23 AM
  4. Replies: 7
    Last Post: 11-27-2013, 08:37 AM
  5. adding signature to the email sendobject
    By webisti in forum Access
    Replies: 3
    Last Post: 07-10-2012, 03:08 PM

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 - Senior Forums