Results 1 to 4 of 4
  1. #1
    webisti is offline The Wisher
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    115

    adding signature to the email sendobject

    Hi I am trying to include in the VB code also the signature :


    Here is my code:
    Code:
    Private Sub Create_Outlook_email()
    Const ForReading = 1, ForWriting = 2, ForAppending = 3
    Dim db As DAO.Database
    Dim fs, f
    Dim RTFBody, strTo
    Dim objOutlookRecip As Outlook.RECIPIENT
    Dim MyOutlook As Outlook.Application
    Dim MyItem As Outlook.MailItem   
     Dim SigString As String
    Dim Signature As String
     
    Set MyOutlook = CreateObject("Outlook.Application")
    Set MyItem = MyOutlook.CreateItem(olMailItem)
    With MyItem
       .To = tmpCustEmail
       .SUBJECT = "Hello Dear customer "
       .HTMLBody = RTFBody & vbCrLf & vbCrLf & Signature
    End With
    MyItem.Display
    but my signature does not appear
    It is saved as a default.htm
    and I am working on a multiuser platform.
    Anybody has overcomed this issue?
    Any help?

    Thanks

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,896
    Google: access vba outlook email signature
    Review http://www.rondebruin.nl/mail/folder3/signature.htm

    You declare RTFBody and Signature variables but I don't see them getting populated.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    webisti is offline The Wisher
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    115
    The signature has this code:
    SigString = "C:\Users\" & fOSUserName & "\AppData\Roaming\Microsoft\Signatures\default .htm "
    If Dir(SigString) <> "" Then
    Signature = GetBoiler(SigString)
    Else
    Signature = ""
    End If
    and the RTFBody is created on the fly via a report.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,896
    Don't understand. Your procedure does not show setting the variables before used. How does RTFBody get from report to this procedure? Did you try the code from the link I referenced? Post your complete procedure.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. SendObject and No Email Address
    By Tomfernandez1 in forum Forms
    Replies: 6
    Last Post: 10-06-2011, 05:15 PM
  2. VBA Send Email using DoCmd.SendObject
    By malamute20 in forum Programming
    Replies: 15
    Last Post: 10-05-2011, 12:44 PM
  3. Replies: 1
    Last Post: 11-17-2010, 11:24 AM
  4. Email sent via DoCmd.SendObject
    By silverback in forum Programming
    Replies: 0
    Last Post: 10-29-2009, 06:26 AM
  5. Send email using SendObject instruction
    By stecco in forum Access
    Replies: 4
    Last Post: 09-09-2009, 01:55 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