|
-
Nov 11th, 2005, 05:44 AM
#1
Thread Starter
PowerPoster
read from distribution list outlook
i use this macro yto read and import from a list:
Elenco Indirizzi Globale/A.T.C.B. - Utenti
the name of users, but i would want to read and import other info for example: alis,Addres, Office..ecc.., how can?
Global RIGA As String
Sub ELENCO()
Range("A2:B50000").ClearContents
Set myOlApp = CreateObject("Outlook.Application")
Set myNameSpace = myOlApp.GetNamespace("MAPI")
Set myGAddressList = myNameSpace.AddressLists("Elenco Indirizzi Globale")
Set myGEntries = myGAddressList.AddressEntries
RIGA = 2
For Each lista In myGEntries
If lista = "A.T.C.B. - Utenti" Then
Range("A" + RIGA) = UCase(lista)
For Each NOM In lista.Members
Range("B" + RIGA) = UCase(NOM)
RIGA = RIGA + 1
Next NOM
Exit For
End If
Next lista
Range("A2").Select
'Call Worksheet_SelectionChange
MsgBox ("IMPORT TERMINATO!")
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|