PC Review


Reply
Thread Tools Rate Thread

Appointment doesn't have HTMLFormat property

 
 
Igor Eremin
Guest
Posts: n/a
 
      5th Aug 2005
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.



 
Reply With Quote
 
 
 
 
Sue Mosher [MVP-Outlook]
Guest
Posts: n/a
 
      5th Aug 2005
See http://www.outlookcode.com/d/formatmsg.htm for the available methods.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"Igor Eremin" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
> Does anybody know the way to set Appointment.Body with formatted text (e.g.
> from MailItem) ?


 
Reply With Quote
 
Igor Eremin
Guest
Posts: n/a
 
      8th Aug 2005
Thank you very much !
It works well with Redemption.

Igor


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change appointment alldayevent property rodp Microsoft Outlook VBA Programming 3 29th Sep 2009 02:40 PM
how to get the Appointment End property soworl Microsoft Outlook VBA Programming 4 10th Apr 2008 11:15 PM
help! how to add custom property to poom contact / appointment / task None Microsoft Dot NET Compact Framework 1 13th Nov 2007 08:45 AM
ddm enable/disable: Object doesn't support this property, my a** it doesn't William DeLeo Microsoft Excel Misc 0 14th Jun 2006 04:48 PM
Appointment doesn't have HTMLFormat property Igor Eremin Microsoft Outlook Form Programming 2 8th Aug 2005 12:30 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:23 PM.