><(({°> | |
03.2003
04.2003 05.2003 06.2003 11.2003 01.2004 02.2004 03.2004 04.2004 05.2004 06.2004 07.2004 09.2004 10.2004 11.2004 01.2005 03.2005 04.2005 05.2005 06.2005 07.2005 08.2005 09.2005 10.2005 11.2005 12.2005 01.2006 02.2006 03.2006 04.2006 06.2006 07.2006 08.2006 10.2006 11.2006 12.2006 02.2007 03.2007 04.2007 06.2007 07.2007 10.2007 11.2007 01.2008 02.2008 03.2008 04.2008 05.2008 06.2008 07.2008 08.2008 09.2008 10.2008 11.2008 01.2009 02.2009 04.2009 07.2009 08.2009 09.2009 11.2009 12.2009 02.2010 04.2010 05.2010 07.2010 |
20 June, 2008
# setting delegates in outlook through vb.net
set the publicDelegates field in AD using dsquery to have something first. In this example, my mail server is "mailserver" and the address to get reviewer rights is all allusers and is a distribution list:
Private Sub SetCalendarPerms() Dim sMailServ = "mailserver" Dim oSession As New MAPI.Session() Dim strMBX = Replace(g_cn, "\", "") Dim oStore As MAPI.InfoStore Dim oRootFolder As MAPI.Folder Dim oFolders As MAPI.Folders Dim oFolder As MAPI.Folder Dim oACLs As New ACLObject Dim oFolderACEs As IACEs Dim oNewACE As New ACE Dim oAddrBook As MAPI.AddressList Dim oDelegate As MAPI.AddressEntries Dim oAllSDC As MAPI.AddressEntry Dim i As Integer Try oSession.Logon(, , , , , , sMailServ & vbLf & strMBX) '("", "", True, True, 0, True, sMailServ & vbLf & strMBX) oStore = CType(oSession.GetInfoStore, MAPI.InfoStore) oRootFolder = CType(oStore.RootFolder, MAPI.Folder) oFolders = CType(oRootFolder.Folders, MAPI.Folders) oFolderACEs = CType(oACLs.ACEs, IACEs) oAddrBook = oSession.AddressLists("Global Address List") oDelegate = oAddrBook.AddressEntries For i = 1 To oDelegate.Count oAllSDC = oDelegate.Item(i) 'If oAllSDC.DisplayType = 1 Then If oAllSDC.Name = "AllUsers" Then Exit For End If ' End If Next For i = 0 To CInt(oFolders.Count) oFolder = CType(oFolders.GetNext, MAPI.Folder) If CStr(oFolder.Name) = "Calendar" Then Exit For End If Next oACLs.CDOItem = oFolder oNewACE.ID = oAllSDC.ID oNewACE.Rights = ACLRIGHTS.ROLE_REVIEWER oFolderACEs.Add(oNewACE) oACLs.Update() oSession.Logoff() Catch ex As Exception MsgBox(ex.Message & " --error setting delegates") End Try End Sub sounddoc
Comments:Post a Comment (0) comments |