• RSS
  • Twitter
  • FaceBook

Exchange Server Forums

Forums | Register | Login | My Profile | Inbox | RSS RSS icon | My Subscription | My Forums | Address Book | Member List | Search | FAQ | Ticket List | Log Out

Create mail-enabled contact in vbscript ?

Users viewing this topic: none

Logged in as: Guest
  Printable Version
All Forums >> [Microsoft Exchange 2003] >> Information Stores >> Create mail-enabled contact in vbscript ? Page: [1]
Login
Message << Older Topic   Newer Topic >>
Create mail-enabled contact in vbscript ? - 23.Mar.2005 3:11:00 PM   
Guest
Hello,

i need to create mail-enabled contact with vbscript but for the moment i have a write error when call the save method.. here is the script :

------------------------------------
Dim oPerson
Dim oRecipent
Dim strUserName

Set oPerson=CreateObject("CDO.person")
strUserName="bob"

'Target address should look like this
strTargetMailAddress = strUserName & "@domain.com"

' get the user
oPerson.DataSource.open "LDAP://SRV/CN=" + strUserName + ",CN=users,DC=domain,DC=org"

' MailEnable
Set oRecipient = oPerson.getInterface("IMailRecipient")
oRecipient.MailEnable strTargetMailAddress

oPerson.DataSource.Save

MsgBox strUserName + " mail enabled successfully"

'CleanUp
Set oPerson = Nothing
Set oRecipient = Nothing

---------------------------------------------

How can i get a write access ??
Many thanks !

yohan.
  Post #: 1

Page:   [1] << Older Topic    Newer Topic >>
All Forums >> [Microsoft Exchange 2003] >> Information Stores >> Create mail-enabled contact in vbscript ? Page: [1]
Jump to:

New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Follow TechGenix on Twitter