Results 1 to 2 of 2

Bold Words In VB

Threaded View

  1. #1
    Forum Contributor
    Join Date
    07-17-2012
    Location
    bangalore
    MS-Off Ver
    Excel 2007
    Posts
    461

    Bold Words In VB

    Hi All,

    I have VB code to send a mail from outlook. Here I need to bold few of the word bold. Is it possible to do so?



    Sub Test1()
    'For Tips see: http://www.rondebruin.nl/win/winmail/Outlook/tips.htm
    'Working in Office 2000-2013
    Dim OutApp As Object
    Dim OutMail As Object
    Dim cell As Range

    Application.ScreenUpdating = False
    Set OutApp = CreateObject("Outlook.Application")

    On Error GoTo cleanup
    For Each cell In Columns("B").Cells.SpecialCells(xlCellTypeConstants)
    If cell.Value Like "?*@?*.?*" And _
    LCase(Cells(cell.Row, "C").Value) = "yes" Then

    Set OutMail = OutApp.CreateItem(0)
    On Error Resume Next
    With OutMail
    .to = cell.Value
    .Subject = "Hi"
    .Body = "Hi, " & vbNewLine & vbNewLine & _
    "I understand your companyName XYZ " & _
    "Warm Regards," & vbNewLine & _
    "Marie Louise"







    'You can add files also like this
    '.Attachments.Add ("C:\test.txt")
    .Send 'Or use Display
    End With
    On Error GoTo 0
    Set OutMail = Nothing
    End If
    Next cell

    cleanup:
    Set OutApp = Nothing
    Application.ScreenUpdating = True
    End Sub
    Last edited by sathishkm; 05-28-2014 at 04:51 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 3
    Last Post: 04-08-2014, 03:45 AM
  2. [SOLVED] VBA Bold Specific Words
    By hobbiton73 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 03-06-2014, 12:40 PM
  3. [SOLVED] how do i make certain words bold?
    By pablowilks in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-14-2013, 02:48 PM
  4. Search and Replace words in bold
    By moochie in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-28-2012, 03:56 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