kishore
Guest
|
Posted:
Wed Dec 15, 2004 9:15 pm Post subject:
How to programmatically modify an addresslist |
|
|
Hi,
I have an application in which I need to programmatically modify an
addresslist in Exchange to add new addresses/contact to it or delete ones.
The problem is that I'm not sure if I will have permission to install
Exchange SDK, or CDOEX on the machines on which my application is going to
run.
I'm a little familiar with ADSI and looked at some of the examples in msdn
regarding ADSI and Exchange, but they weren't that helpul for this situation.
2 questions:
1. If I were able to install CDOEX on the machines, is CDOEX dependent on
any other components?
2. I'm a newbie to LDAP, is it possible to modify an addresslist through
ADSI/LDAP without using CDOEX or exchange SDK? If so, can some one direct me
or show some sample code on doing so?
Thanks.
-Kishore
|
|
Glen Scales [MVP]
Guest
|
Posted:
Fri Dec 17, 2004 5:53 am Post subject:
Re: How to programmatically modify an addresslist |
|
|
CDOEX is only supported locally on a Exchange server have a read of
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/e2k3/e2k3/_techsel_tech_3.asp
What type of addresslist are you trying to modify eg are you trying to add
member to a mailenabled distribution (or security) Active Directory group,
or are you trying to add and remove users from a Contact folder Distribution
List in a public folder or users contacts folder ?
If its an AD group than there are a lot of samples out there of adding users
to a group eg
set groupobj = getobject(LdapDNGroup)
groupboj.add (LdapDNusertoadd)
groupobj.setinfo
If its a Contact folder Distribution List then you need to use an Exchange
API to do it, one method is to use CDO 1.2 have look at
http://support.microsoft.com/?kbid=178787 which has some code to do this
Another way is to reuse some OWA commands there are a couple of samples of
how to do this at
http://www.infinitec.de/pages/?page=knowledge&category=kb&id=IT000019 and
http://gsexdev.blogspot.com/2004/09/scripting-contact-folder-distribution.html
Cheers
Glen
"kishore" <kishore@discussions.microsoft.com> wrote in message
news:DC50AE56-3F0B-459E-94CB-28E23B051065@microsoft.com...
| Quote: | Hi,
I have an application in which I need to programmatically modify an
addresslist in Exchange to add new addresses/contact to it or delete ones.
The problem is that I'm not sure if I will have permission to install
Exchange SDK, or CDOEX on the machines on which my application is going to
run.
I'm a little familiar with ADSI and looked at some of the examples in msdn
regarding ADSI and Exchange, but they weren't that helpul for this
situation.
2 questions:
1. If I were able to install CDOEX on the machines, is CDOEX dependent on
any other components?
2. I'm a newbie to LDAP, is it possible to modify an addresslist through
ADSI/LDAP without using CDOEX or exchange SDK? If so, can some one direct
me
or show some sample code on doing so?
Thanks.
-Kishore
|
|
|