Appointment doesn't have HTMLFormat property

I

Igor Eremin

Does anybody know the way to set Appointment.Body with formatted text (e.g.
from MailItem) ?

I have made Outlook form based on "Message" form that sends programmatically
MailItem and Meeting Request at the same time.
User fills out form fields and "Body" field should save formatting on both
objects. So, I'm trying to copy Item.Body and Item.HTMLBody to new MailItem
and Meeting Request objects, but Outlook are saving only format of MailItem
object. I tried to set Item.BodyFormat to "HTMLFormat" and "RTF" values, but
it isn't working.

Here is the code snippet:

Set oAppointment = Application.CreateItem(1) oAppointment.MeetingStatus = 1
' olMeeting = 1
If Item.BodyFormat = 2 Then ' olFormatHTML = 2
oAppointment.Body = Item.HTMLBody
Else
oAppointment.Body = Item.Body
End If
oAppointment.Subject = Item.Subject
oAppointment.ReminderSet = True
oAppointment.ReminderMinutesBeforeStart = nMinutesToRemind
oAppointment.Location = sLocation
oAppointment.Start = CDate(CDbl(CDate(dtStartDate)) +
CDbl(CDate(dtStartTime)))
oAppointment.End = CDate(CDbl(CDate(dtEndDate)) + CDbl(CDate(dtEndTime)))
For Each oRecipient in Item.Recipients
Set oRep = oAppointment.Recipients.Add(oRecipient.Name) ' 1 = olTo
oRep.Type = 2 ' olOptional = 2
Next
End If
oAppointment.Send

Thanks in advance.
 
Top