Title: Message
I need a piece of code that, given a user object, returns me an object or collection to all of the email addresses for that user. I can't find the object.
 
Help!
 
Set objContainer = GetObject("LDAP://CN=Users," + DomainName)
 
objContainer.Filter = Array("User")
i = 0
 
For Each objUser In objContainer
   name = objUser.name
   name = Right(name, Len(name) - 3)
   Set objMailbox = objUser
    <<---->>> code goes here!!!
   If objMailbox.HomeMDB = "" Then
      Wscript.echo name + "   (no mailbox)"
   Else
      Wscript.echo name + "   (has mailbox)"
   End If
   i = i + 1
Next
Wscript.echo "Number of users found in the DS (in the default container): " & i
 
Thanks
 

Reply via email to