Outlook Appointment Item + Redemption Security Warnings

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

.........
 
S

Sue Mosher [MVP-Outlook]

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.
 
D

Dmitry Streblechenko \(MVP\)

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
 

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

Top