+ Reply to Thread
Results 1 to 2 of 2

Change color of a specific line when using userform to send an email using outlook.

  1. #1
    Registered User
    Join Date
    04-06-2016
    Location
    Scottsdale,AZ
    MS-Off Ver
    2013
    Posts
    1

    Change color of a specific line when using userform to send an email using outlook.

    Hello,

    I want to be able to change the color of some text when it is being sent over to outlook. Not sure if this is easily doable. Any help is greatly appreciated.

    I want to send the QuoteTextBox.Value in red.

    Dim OutApp As Object
    Dim OutMail As Object
    Dim strbody As String

    Set OutApp = CreateObject("Outlook.Application")
    Set OutMail = OutApp.CreateItem(0)

    strbody = "Hello," & Chr(13) & Chr(13) & _
    "We would like to go ahead and order the " & PartTextBox.Value & " " & "as quoted below." & Chr(13) & Chr(13) & _
    QuoteTextBox.Value & Chr(13) & Chr(13) & _
    "Please ship to the address provided below." & Chr(13) & Chr(13) & _
    VendorTextBox.Value & Chr(13) & _
    VendorAddressTextBox.Value & Chr(13) & _
    CityTextBox.Value & Chr(13) & _
    ContactTextBox.Value & Chr(13) & _
    PhoneTextBox.Value & Chr(13) & Chr(13) & _
    "Approved Ammount:" & " " & ApprovedTextBox.Value & Chr(13) & _
    "PO Number:" & " " & POTextBox.Value & Chr(13) & Chr(13) & _
    "Thank you," & Chr(13) & _
    SenderTextBox.Value & Chr(13) & _
    "DriveTime Fleet Operations Team"

    On Error Resume Next

    With OutMail
    .To = RecipientComboBox.Value
    .CC = ""
    .BCC = ""
    .Subject = YMMTextBox.Value & " " & StockNumberTextBox.Value
    .Body = strbody
    .Display
    'Application.SendKeys "%s"
    End With

  2. #2
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Change color of a specific line when using userform to send an email using outlook.

    I believe you would need html instead of plain text....

    Please Login or Register  to view this content.
    I tried posting the font color tag also but that won't work with the site... the server blocks it. Just google hmtl font color and put the code around the textbox
    Last edited by Arkadi; 04-06-2016 at 01:31 PM.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

+ 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. Send an email via outlook from and address other than your default email.
    By sungen99 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-28-2015, 06:15 PM
  2. Automatic send email change from Outlook to Lotus Notes
    By thuydo in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-12-2015, 12:19 AM
  3. Send Userform Data via Outlook Email
    By dan.jones in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-19-2015, 06:33 AM
  4. [SOLVED] Send email from excel using outlook on a specific date
    By Eyeson in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 07-09-2014, 01:47 AM
  5. [SOLVED] Save and Send Userform data to a specific email address based on Combobox value
    By GAMU in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-30-2013, 01:13 PM
  6. send selected range in email with default outlook email signature included
    By mdsickler in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-04-2013, 10:50 PM
  7. [SOLVED] Change Font Size/Color on one line of an email automatically generated by a code.
    By coxb in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-18-2012, 01:55 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