Hello,
I have created a macro to send mails form outlook. All code is working properly. I jast want to know how to do formating of the signature in the mail. i wana make my name bold in the signature. Can anyone help me?
This is the code:
Sub ReadExcel()
Dim OutApp As Object
Dim fLoc As String
Dim cell As Range, rng As Range
Dim vFile As Variant, vFiles As Variant
Dim Signature As String
'Range of cells with recipeant info
'Column A is attaachment filenames (multiple filenames separated by ; e.g File1.xls;File2.xls
'Column B is the email address
'Column C is the File path for the attachment files
'Column D id the body of the mail
With ThisWorkbook.ActiveSheet
Set rng = .Range("A2", .Range("A" & Rows.Count).End(xlUp))
End With
Set OutApp = CreateObject("Outlook.Application")
' Read in the data and create a new message with attachment for each Excel entry
For Each cell In rng
'File path in column C
fLoc = cell.Offset(, 2).Value
If Right(fLoc, 1) <> "\" Then fLoc = fLoc & "\"
'Create a new Email for each recpient
With OutApp.CreateItem(0)
'Recipient
.Recipients.Add cell.Offset(, 1).Value
'Attach each file
vFiles = Split(cell.Value, ";")
For Each vFile In vFiles
If Len(Dir(fLoc & vFile)) Then
.Attachments.Add fLoc & vFile
Else
AppActivate ThisWorkbook.Parent
MsgBox "Could not locate file: " & vbCr & fLoc & vFile, , "File Not Found"
End If
Next vFile
.Display
.Subject = "Weekly Sales Report"
.Body = Sheets("sheet1").Cells(2, 4).Value
.Send
End With
Next cell
End Sub
Bookmarks