Platform SDK: Exchange 2000 Server |
[This is preliminary documentation and subject to change.]
This example sets the proxy addresses for a mailbox-enabled user.
Sub SetProxyAddress(ServerName As String, _ DomainName As String, _ recipname As String) 'ServerName is something like "MyServer6" 'DomainName is something like "DC=MYDOMAIN3,DC=microsoft,DC=com" 'recipname is something like "jamessmith" Dim objPerson As New CDO.Person Dim objMailRecip As CDOEXM.IMailRecipient Dim i objPerson.DataSource.Open "LDAP://" + ServerName + _ "/CN=" + recipname + _ ",CN=users," + DomainName 'Capitalized proxy type for proxies(1) makes it the primary (reply) address. 'the others are recieve only. Dim proxies(3) As Variant proxies(0) = "smtp:user@somewhere.microsoft.com" proxies(1) = "SMTP:user@somewhere.microsoft.com" proxies(2) = "x400:c=us;a= ;p=Domain;o=First Organization;s=user;" Set objMailRecip = objPerson objMailRecip.ProxyAddresses = proxies 'look at the results Debug.Print Chr(13) + Chr(13) + Chr(13) + Chr(13) + Chr(13) 'add some space For i = LBound(objMailRecip.ProxyAddresses) To UBound(objMailRecip.ProxyAddresses) Debug.Print objMailRecip.ProxyAddresses(i) Next objPerson.DataSource.Save MsgBox "Proxy addresses for " + recipname + " set successfully" End Sub