Excelmasters
Board Regular
- Joined
- Jun 11, 2015
- Messages
- 115
Hi there,
below is my code to send email.
its working fine. but i want to change the font size to 36 and bold and style to viner hand itc.
"msg" is my variable here.
how do i change it.. please help.
below is my code to send email.
its working fine. but i want to change the font size to 36 and bold and style to viner hand itc.
"msg" is my variable here.
how do i change it.. please help.
Code:
Sub DoBirthdayRoutine()
Dim olApp As Outlook.Application
Dim MItem As Outlook.MailItem
Dim cell As Range
Dim Subj As String
Dim EmailAddr As String
Dim Msg As String
Dim EmailAddr2 As String
Dim xpath As String
Dim x As String
Dim strbody As String
Set olApp = New Outlook.Application
Application.ScreenUpdating = False
Sheets("Sheet1").Activate
LR = Range("B" & Rows.Count).End(xlUp).Row
For Each cell In Columns("D").Cells.SpecialCells(xlCellTypeVisible)
If cell.Value Like "*@*" Then
EmailAddr2 = EmailAddr2 & ";" & cell.Value
End If
Next
For Each cell In Range("B2:B" & LR)
If Month(cell) = Month(Date) And Day(cell) = Day(Date) Then
Fname = Left(cell.Offset(, -1), InStr(cell.Offset(, -1), " ") + 1)
Subj = "Happy B'day"
EmailAddr = cell.Offset(, 1).Value
Msg = "Hi All, "
xpath = "d:\My documents\" & Fname & ".jpg"
Msg = Msg & vbNewLine & " Let us wish a very Happy Birthday to -" & Fname & vbCrLf & vbCrLf
Set MItem = olApp.CreateItem(olMailItem)
With MItem
.To = EmailAddr
.Subject = Subj
.Body = Msg
.bcc = EmailAddr2
.Attachments.Add (xpath)
.Attachments.Add "D:\my documents\mypic.jpg"
.HTMLBody = .HTMLBody & "<img src='cid:'xpath" & "width='1141' height='747'><br>"
.HTMLBody = .HTMLBody & "<img src='cid:mypic.jpg'" & "width='314' height='235'><br>"
.Display
End With
End If
Next
'Application.DisplayAlerts = False
'ThisWorkbook.Close Saved = True
Application.ScreenUpdating = True
End Sub