Avoiding security pop up on MeetingItem.Respond/Send

N

Nebuchenazarr

Using Outlook 2000, I have a custom rule that accepts meeting requests
automatically when a new meeting item is received. Unfortunatly there are two
security warning that pop up when I use the respond and send method. Here is
my code :

MsgBox "variable creation"
Dim strId As String
Dim oNS As Outlook.NameSpace
Dim oMeeting As Outlook.MeetingItem
Dim oAppt As Outlook.AppointmentItem
Dim oMtg As Outlook.MeetingItem
Dim oAtg As Outlook.AppointmentItem
MsgBox "getting meeting id"
strId = Item.EntryID
Set oNS = Application.GetNamespace("MAPI")
Set oMeeting = oNS.GetItemFromID(strId)
MsgBox "getting associated appointment"
Set oAppt = oMeeting.GetAssociatedAppointment(True)
MsgBox "getting appointment id"
strId = oAppt.EntryID
Set oAtg = oNS.GetItemFromID(strId)
MsgBox "setting respond"
Set oMtg = oAtg.Respond(olMeetingAccepted, True)
MsgBox "sending"
oMtg.Send
MsgBox "clearing variables"
Set oMeeting = Nothing
Set oAppt = Nothing
Set oMtg = Nothing
Set oAtg = Nothing
Set oNS = Nothing

As you can see I tried getting around the object model guard by using the
entry id but it does'nt seem to work for a meeting item fetched from
GetAppointmentItem. I have looked at http://www.outlookcode.com/d/sec.htm and
the discussion group and did'nt come up with any solution. For some reason it
works fine on Outlook 2003, but we need to make it work on 2000.

Thanks
 
S

Sue Mosher [MVP-Outlook]

As you can see I tried getting around the object model guard by using the
entry id but it does'nt seem to work for a meeting item fetched from
GetAppointmentItem.

It doesn't apply at all to Outlook 2000. You'll need to use one of the other approaches detailed on the page you cited.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 

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