Populating an Outlook appointment with RTF text- followup

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

This is something I have asked about before and have almost figured out.
Thanks to Sue Mosher's advice some months back, using Redemption has rendered
it possible using the code below, where objContact.rtfbody is populated from
a Rich Text control in Access.

However, I ideally want to pouplate it from a .rtf file, in this case
H:\RTF_Temp.rtf as shown below. Any ideas?

Thanks in advance


Simon

Dim objApp As Outlook.Application
Dim objNS As Outlook.NameSpace
Dim objFolder As Outlook.MAPIFolder
Dim objDummy As Outlook.MailItem
Dim objRecip As Outlook.Recipient
Dim objAppt As Outlook.AppointmentItem
Dim wrdRTF As Word.Document
Dim objContact As Object

strName = "Calendar, EQT_RES (Pharmaceuticals)"

Set wrdRTF = GetObject("H:\RTF_Temp.rtf")

Set objContact = CreateItem("Redemption.SafeMeetingItem")


Set objApp = CreateObject("Outlook.Application")
Set objNS = objApp.GetNamespace("MAPI")
Set objDummy = objApp.CreateItem(olMailItem)
Set objRecip = objDummy.Recipients.Add(strName)


objRecip.Resolve
Set objFolder = objNS.GetSharedDefaultFolder(objRecip, olFolderCalendar)

Set objAppt = objFolder.Items.Add

Set objContact = New Redemption.SafeAppointmentItem
objContact.Item = objAppt
With objContact
.Subject = "Test Appointment"
.Start = "01/07/2005"
.End = "01/07/2005"
.AllDayEvent = True
.rtfbody = ???????????
.Save

End With
 
Back
Top