Results 1 to 1 of 1

Retain the colors and different style in Body of email

Threaded View

  1. #1
    Registered User
    Join Date
    10-13-2012
    Location
    Carrollton, TX
    MS-Off Ver
    Excel 2007
    Posts
    28

    Retain the colors and different style in Body of email

    I have a macros that copies over a cell that has text in different colors and bold and plain type. When it pastes in the email, it is all one fixed font. See below for the code. I have attached an example of what I would like for the body of the email to look like. Any help is appreciated, Thanks!!

    Sub SPANISH_MANUALTIME_EMAIL()
    
        Dim OutApp As Object
        Dim OutMail As Object
        Dim strbody As String
        Dim SigString As String
        Dim Signature As String
        Dim rng As Range
        
        Set rng = Sheets("EMAIL").Range("C3").SpecialCells(xlCellTypeVisible)
        
        Set OutApp = CreateObject("Outlook.Application")
        Set OutMail = OutApp.CreateItem(0)
            
            SigString = Environ("appdata") & _
         "\Microsoft\Signatures\Santander.htm"
    
        If Dir(SigString) <> "" Then
            Signature = GetBoiler(SigString)
        Else
            Signature = ""
        End If
        
        
        On Error Resume Next
        With OutMail
            .To = "@Serv: Frontend Managers"
            .CC = "My Team"
            .BCC = ""
            .Subject = Sheets("EMAIL").Range("B3")
            .htmlbody = "<style> .fixedfont {font-size : 11pt}</style> <font face=""+Body"" class=""fixedfont"">" & RangetoHTML(rng) & "<br><br>" & Signature
            .Display
        End With
    
    End Sub
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

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