Outlook Appointment Item + Redemption Security Warnings

  • Thread starter Thread starter Ben Crinion
  • Start date Start date
B

Ben Crinion

Hi

Im getting security warnings when assigning the appointment object to the
SafeAppointmentItem.Item.

I then get another warning when trying to access the body of the
SafeItem.Item.

I think that the problem is probably due to this line "Dim WithEvents
objAppointment As Outlook.AppointmentItem" but i dont know why. I guess that
makes this a guess.

Here is the code.

thanks
ben

Dim WithEvents objAppointment As Outlook.AppointmentItem

Public Sub objAppointment_Write(Cancel As Boolean)

On Error GoTo Err_OnAppointmentWrite
Dim sReminderSubject As String
Dim sReminderLocation As String
Dim sReminderBody As String
Dim sSavedReminderSubject As String

Dim sRemindBeforeStart As String
Dim sSavedRemindBeforeStart As String

sReminderSubject = objAppointment.Subject
sSavedReminderSubject =
objAppointment.UserProperties.Find("ReminderSubject")

sReminderLocation = objAppointment.Location

Dim SafeItem As Redemption.SafeAppointmentItem
Set SafeItem = CreateObject("TBOLcom.SafeAppointmentItem")

'******next line gives security warning
SafeItem.Item = objAppointment
'******next line gives security warning
sReminderBody = SafeItem.Item.Body 'objAppointment.Body

.........
 
SafeItem.Item.Body is equivalent to AppointmentItem.Body. What you want to
use is SafeItem.Body.

I don't know why the SafeItem.Item statement would trigger a security
prompt, though.
 
Replace the line
sReminderBody = SafeItem.Item.Body
with
sReminderBody = SafeItem.Body

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Back
Top