home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 27 / IOPROG_27.ISO / SOFT / ADSDK.ZIP / Samples / Exchange / HomeMDB / HomeMDB.bas next >
Encoding:
BASIC Source File  |  1999-02-03  |  622 b   |  23 lines

  1. Attribute VB_Name = "Module1"
  2. Sub Main()
  3.  
  4.  
  5. srvName = "exchsrv"
  6. Set objMailbox = GetObject("LDAP://" & srvName & "/cn=jsmit,cn=Recipients,ou=REDMOND,o=ArcadiaBay")
  7.     
  8. objMailbox.GetInfoEx Array("Home-MDB"), 0
  9. dnPath = objMailbox.Get("Home-MDB")
  10. Debug.Print dnPath
  11.  
  12. 'Build the ADsPath for Home MDB
  13. adsPath = "LDAP://" & srvName & "/" & dnPath
  14. Set homeMDB = GetObject(adsPath)
  15.  
  16. 'Home MDB object resides on the computer object
  17. 'So we need to go up one level before we get the computer object
  18. Set srvMDB = GetObject(homeMDB.Parent())
  19. Debug.Print "Home MDB ServerName is: " & srvMDB.Get("rdn")
  20.  
  21.  
  22. End Sub
  23.