+ Reply to Thread
Results 1 to 3 of 3

Signature on Outlook VBA

  1. #1
    Registered User
    Join Date
    05-04-2013
    Location
    Houston, Texas
    MS-Off Ver
    Excel 2010
    Posts
    12

    Signature on Outlook VBA

    Hi,

    I was doing some research how to send an automatic email from vba, but when I try to use the signature the format just goes bad, my name which supposedly is in Bold format goes to a standard format, the things I had smaller also go to the same format and my email goes HYPERLINK "mailto:dtrickster@hotmail.com"dtrickster@hotmail.com, is it possible that modifying the code can make the signature right??

    I'll put it down so you can look at it

    Dim OApp As Object, OMail As Object, signature As String
    Set OApp = CreateObject("Outlook.Application")
    Set OMail = OApp.CreateItem(0)
    With OMail
    .Display
    End With
    signature = OMail.body
    With OMail

    .to = N9 & N10 & N11 & N12 & N13 & N14 & N15 & N16
    .CC = N17
    .Subject = "FX Receipt"
    .body = "Dear " & Contact _
    & "" & vbCr & "Thank you" _
    & vbNewLine & signature

    .Attachments.Add ("V:\Receipt\Backup\" & n & ".pdf")

    End With


    Set OMail = Nothing
    Set OApp = Nothing

  2. #2
    Registered User
    Join Date
    05-04-2013
    Location
    Houston, Texas
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Signature on Outlook VBA

    Or at least a way to change Font on some parts of the Body in order to make it look as a signature

  3. #3
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Signature on Outlook VBA

    Hi, lauren04,

    have you had a look at Insert Outlook Signature in mail?

    HTML Code: 
    Thatīs part of the body I use being formatted in one size (might be altered by you to fit).

    Could you please add code-tags when you show your procedures?

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1