Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_cdo thread: Re: Description: [Collaboration Data Objects - [E_ACCESSDENIED(80070005)]]


Message #1 by "Daniel Kliche" <DanielKliche@g...> on Tue, 11 Jun 2002 14:52:24
Hi

I got the same error on adding a new address to a public address list.
Maybe you know what is wrong or what to change.

My plattform: Windows 2000 Server SP2, Exchange Server 2000, SQL Server 
2000, Office 2000, Visual Basic 6.0, 
Using Microsoft CDO 1.21 Library 


Exchange Address list in ?Recipients\all Addresslists\Mylist?


I need to access and edit this global address list,
Everyone has full authorization but if I try to add a new Address, it 
raises the error
    [Colaboration Data Objects - [E_AccessDenied (80070005)]]

Here?s my code:

Public Sub SaveAddressEntry()

    	Dim objAddressList As MAPI.AddressList
    	Dim objAddressEntry As MAPI.AddressEntry
    	Dim colAddressentries As MAPI.AddressEntries
    
        On Error GoTo ErrHandler
    
    	For Each objAddressList In gobjSession.AddressLists
   
    	   If objAddressList.Name = "Mylist" Then
    
              Set objAddressEntry = objjAddressList.AddressEntries.Add     
("Test@T...",  "Daniel Kliche", ?Test21")
        	      objaddressEntry.Update
       	      'Set objAddressentry = colAddressentries.GetFirst
   	   End If
    	Next


ExitFunc:
    Exit Sub
 
ErrHandler:
    Call ReportError(Err)
    Resume ExitFunc
End Sub

Thanks
Daniel


> Hi,
> 
> 
> I was just wondering if anyone has ever seen the above message before in 
> relation to creating a Public Folder.
> 
> I have the exact same script on another Public Folder creating a folder 
> based on a substring of the subject line and it works. When I attempt to 
> run the script against a particular folder (that I have 'owner' 
permission 
> on including subfolders) it gives the message:
> 
> Description:  [Collaboration Data Objects - [E_ACCESSDENIED(80070005)]]
> 
> I am able to traverse the Pubilc folder tree to the target folder where 
> the subfolder should be created and where the script is attached as I 
have 
> owner privileges. I have less permissions on the folders above the other 
> folder where the script works. I am a little confused trying to get this 
> working.
> 
> I am attempting to find a solution but no luck. Has anyone seen this 
> before?
> 
> 
> Thanks.
Message #2 by "Siegfried Weber" <sweber@c...> on Tue, 11 Jun 2002 16:50:13 +0200
You cannot use CDO 1.21 to add or remove entries from the Exchange 2000
address lists (which are actually Active Directory entries). Use ADSI
instead.

<Cheers:Siegfried runat=3D"server" />

> -----Original Message-----
> From: Daniel Kliche [mailto:DanielKliche@g...]
> Sent: Tuesday, June 11, 2002 4:52 PM
> To: ASP CDO
> Subject: [asp_cdo] Re: Description: [Collaboration Data Objects -
> [E_ACCESSDENIED(80070005)]]
>
> Hi
>
> I got the same error on adding a new address to a public address list.
> Maybe you know what is wrong or what to change.
>
> My plattform: Windows 2000 Server SP2, Exchange Server 2000, SQL
Server
> 2000, Office 2000, Visual Basic 6.0,
> Using Microsoft CDO 1.21 Library
>
>
> Exchange Address list in "Recipients\all Addresslists\Mylist"
>
>
> I need to access and edit this global address list,
> Everyone has full authorization but if I try to add a new Address, it
> raises the error
>     [Colaboration Data Objects - [E_AccessDenied (80070005)]]
>
> Here's my code:
>
> Public Sub SaveAddressEntry()
>
>     	Dim objAddressList As MAPI.AddressList
>     	Dim objAddressEntry As MAPI.AddressEntry
>     	Dim colAddressentries As MAPI.AddressEntries
>
>         On Error GoTo ErrHandler
>
>     	For Each objAddressList In gobjSession.AddressLists
>
>     	   If objAddressList.Name =3D "Mylist" Then
>
>               Set objAddressEntry =3D 
objjAddressList.AddressEntries.Add
> ("Test@T...",  "Daniel Kliche", "Test21")
>         	      objaddressEntry.Update
>        	      'Set objAddressentry =3D colAddressentries.GetFirst
>    	   End If
>     	Next
>
>
> ExitFunc:
>     Exit Sub
>
> ErrHandler:
>     Call ReportError(Err)
>     Resume ExitFunc
> End Sub
>
> Thanks
> Daniel
>
>
> > Hi,
> >
> >
> > I was just wondering if anyone has ever seen the above message
before in
> > relation to creating a Public Folder.
> >
> > I have the exact same script on another Public Folder creating a
folder
> > based on a substring of the subject line and it works. When I
attempt to
> > run the script against a particular folder (that I have 'owner'
> permission
> > on including subfolders) it gives the message:
> >
> > Description:  [Collaboration Data Objects -
[E_ACCESSDENIED(80070005)]]
> >
> > I am able to traverse the Pubilc folder tree to the target folder
where
> > the subfolder should be created and where the script is attached as
I
> have
> > owner privileges. I have less permissions on the folders above the
other
> > folder where the script works. I am a little confused trying to get
this
> > working.
> >
> > I am attempting to find a solution but no luck. Has anyone seen this
> > before?
> >
> >
> > Thanks.

  Return to Index