Appointment doesn't have HTMLFormat property


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
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)) +
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
End If

Thanks in advance.

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question