+ Reply to Thread
Results 1 to 1 of 1

import property from outlokk distribution list

  1. #1
    sal21
    Guest

    import property from outlokk distribution list

    i use this to import iser but i would want to import all propetry of
    user : Adress, Name, Email, ecc.... how i can..?

    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) = 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


  2. #2
    Forum Contributor
    Join Date
    10-28-2003
    Location
    Italy
    MS-Off Ver
    11
    Posts
    126

    import property from outlook distribution list

    i read and import into a sheet the user name from a distribution list....
    is possible to read the propety from each user into this list.?
    Example: Name, FullName, Address.... ecc...
    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) = 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

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1