View Single Post
  #2  
Old November 9th 06, 01:50 AM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Avoiding security pop up on MeetingItem.Respond/Send

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
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Nebuchenazarr" wrote in message ...
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

Ads