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