aryanaveen
Board Regular
- Joined
- Jan 5, 2015
- Messages
- 104
Hi All,
Please help me with below code, This code is creating a meeting invite, however body of email is coming as plain text, Is there a way to retain the format from excel file
Sub Setupinvite()
Dim OutApp As Object
Dim OutMail As Object
Dim cell As Range
Application.ScreenUpdating = True
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(1)
With OutMail
.MeetingStatus = olMeeting
.RequiredAttendees = Range("B2").Value
'.RequiredAttendees.Type = RequiredAttendees
.Subject = Range("B3").Value
If Range("B19").Value = "Yes" Then
.Body = Range("B6").Value & vbNewLine & vbNewLine & Range("B8").Value & _
vbNewLine & vbNewLine & Range("B10").Value & vbNewLine & vbNewLine & _
Range("C12").Value & vbNewLine & _
Range("C19").Value & vbNewLine & vbNewLine & "Note: Considering the current situation we are unable to book rooms for the call" & _
vbNewLine & vbNewLine & "Kind Regards,"
Else
.Body = Range("B6").Value & vbNewLine & vbNewLine & Range("B8").Value & _
vbNewLine & vbNewLine & Range("B10").Value & vbNewLine & vbNewLine & _
Range("C12").Value & vbNewLine & _
vbNewLine & vbNewLine & "Note: Considering the current situation we are unable to book rooms for the call" & _
vbNewLine & vbNewLine & "Kind Regards,"
End If
.Start = Range("C16").Value
.Location = "Skype call"
.Duration = 60 ' 1 hour meeting
.BusyStatus = 2 ' set as busy
.ReminderSet = True 'reminder set
.ReminderMinutesBeforeStart = "15" 'reminder 2 weeks before
.Attachments.Add
.Display
'.Send
End With
'Cells(cell.Row, "K").Value = "sent"
Set OutMail = Nothing
Application.ScreenUpdating = True
End Sub
Please help me with below code, This code is creating a meeting invite, however body of email is coming as plain text, Is there a way to retain the format from excel file
Sub Setupinvite()
Dim OutApp As Object
Dim OutMail As Object
Dim cell As Range
Application.ScreenUpdating = True
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(1)
With OutMail
.MeetingStatus = olMeeting
.RequiredAttendees = Range("B2").Value
'.RequiredAttendees.Type = RequiredAttendees
.Subject = Range("B3").Value
If Range("B19").Value = "Yes" Then
.Body = Range("B6").Value & vbNewLine & vbNewLine & Range("B8").Value & _
vbNewLine & vbNewLine & Range("B10").Value & vbNewLine & vbNewLine & _
Range("C12").Value & vbNewLine & _
Range("C19").Value & vbNewLine & vbNewLine & "Note: Considering the current situation we are unable to book rooms for the call" & _
vbNewLine & vbNewLine & "Kind Regards,"
Else
.Body = Range("B6").Value & vbNewLine & vbNewLine & Range("B8").Value & _
vbNewLine & vbNewLine & Range("B10").Value & vbNewLine & vbNewLine & _
Range("C12").Value & vbNewLine & _
vbNewLine & vbNewLine & "Note: Considering the current situation we are unable to book rooms for the call" & _
vbNewLine & vbNewLine & "Kind Regards,"
End If
.Start = Range("C16").Value
.Location = "Skype call"
.Duration = 60 ' 1 hour meeting
.BusyStatus = 2 ' set as busy
.ReminderSet = True 'reminder set
.ReminderMinutesBeforeStart = "15" 'reminder 2 weeks before
.Attachments.Add
.Display
'.Send
End With
'Cells(cell.Row, "K").Value = "sent"
Set OutMail = Nothing
Application.ScreenUpdating = True
End Sub