+ Reply to Thread
Results 1 to 3 of 3

Font Size and Removing Extra Lines in Created Email

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    07-07-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    500

    Font Size and Removing Extra Lines in Created Email

    Greetings,
    I am using the following code to create an email. All works good, except I want the font size to be 12-points (not the current 13.5). Also, I need to remove the extra line below "P.O. Amount", my signature block is defaulted to have 2 lines between the end of the email body and the block.

    Sub Email_AA()
        Dim OutApp As Object
        Dim OutMail As Object
        Dim strbody As String
    
        Set OutApp = CreateObject("Outlook.Application")
        Set OutMail = OutApp.CreateItem(0)
    
        strbody = "<font face=""Calibri"" size= ""4"" > " & Sheet3.Range("A433") & "<br>" & "<br>" & "Please issue a PO for the attached/following:" & _
        "<br>" & "<br>" & _
        "<b> Project Name: </b>" & Sheet3.Range("A434") & "<br>" & _
        "<b> Project #: </b>" & Sheet3.Range("A435") & "<br>" & _
        "<b> PID: </b>" & Sheet3.Range("A436") & "<br>" & _
        "<b> Vendor Name: </b>" & Sheet3.Range("A402") & "<br>" & _
        "<b> Vendor Contact: </b>" & Sheet3.Range("C402") & "<br>" & _
        "<b> Email: </b>" & Sheet3.Range("M402") & "<br>" & _
        "<b> Work Phone: </b>" & Sheet3.Range("I402") & "<br>" & _
        "<b> Cell: </b>" & Sheet3.Range("J402") & "<br>" & _
        "<b> P.O. Amount: " & Format(Sheet3.Range("Q402").Value2, "$0.00")
    
        On Error Resume Next
    
        With OutMail
            .Display
            .To = "xxx.com"
            .cc = ""
            .BCC = ""
            .Subject = Sheet3.Range("A3")
            .HTMLBody = strbody & .HTMLBody
            .Display
        End With
    
        On Error GoTo 0
        Set OutMail = Nothing
        Set OutApp = Nothing
    End Sub
    Attached Images Attached Images

  2. #2
    Valued Forum Contributor
    Join Date
    03-24-2020
    Location
    Thailand
    MS-Off Ver
    Office 2016
    Posts
    897

    Re: Font Size and Removing Extra Lines in Created Email

    Hi brentjohn,

    For the font size, try replacing:

    strbody = "<font face=""Calibri"" size= ""4"" > .....

    With:
    strbody = "<BODY style=font-size:12pt;font-family:Calibri> .....

    Hard to say about the extra line without knowing the data and the signature setup.
    If your Question is answered; please mark it SOLVED. If you are happy with a member's solution, say 'Thanks' and click the 'Star' to Add Reputation.

  3. #3
    Forum Contributor
    Join Date
    07-07-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    500

    Re: Font Size and Removing Extra Lines in Created Email

    ORoos,
    Thank you for your help. For some reason it is still creating with 11pt font. I've change the size and it is either 11pt or 12.5pt.
    Again, thank you much!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. change text and font size in email
    By michael35 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-16-2019, 12:13 AM
  2. [SOLVED] Change font size in email using VBA
    By Maleficent in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-30-2019, 11:49 AM
  3. Userform Command Button Caption (multiple lines & different font size)
    By VAer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-11-2017, 05:08 PM
  4. Changing Font, Size, Colour in VB Email
    By Ebony Larkin in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-19-2015, 11:48 AM
  5. Setting a substitute font for a VBA created Email if recipient doesn't have the body font
    By WiliamsRenault in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-25-2014, 05:10 AM
  6. [SOLVED] Email Macro Changing Font and Size
    By dieseldogpi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-07-2014, 01:20 PM
  7. [SOLVED] Add 2 lines in email before signature and font chage
    By gujugolf in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-20-2012, 05:21 PM

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