|
| |
|
|
|

|

|
Dicas
|

|
Visual Basic (Internet)
|
|
 |
Título da Dica: Ler o catálogo de endereços usando MAPI
|
 |
|
|
Postada em 1/1/2004 por PC
Inclua o componente Microsoft MAPI Controls 6.0 (MSMAPI32.OCX)
Dim i As Integer Dim msgSet As MAPIMessages Dim sAdresses() As String frmMain.MAPISession.DownLoadMail = False frmMain.MAPISession.SignOn With frmMain.MAPIMessages .SessionID = frmMain.MAPISession.SessionID .FetchUnreadOnly = True .Fetch ReDim sAdresses(0) For i = 0 To .MsgCount - 1 .MsgIndex = i sAdresses(UBound(sAdresses)) = .MsgOrigAddress ReDim Preserve sAdresses(UBound(sAdresses) + 1) Next i ReDim Preserve sAdresses(UBound(sAdresses) - 1) .MsgIndex = -1 .AddressResolveUI = False For i = 0 To UBound(sAdresses) .Compose .RecipAddress = sAdresses(i) .ResolveName MsgBox .RecipDisplayName Next i End With frmMain.MAPISession.SignOff
|
|
|
|

|
|
|