Get GAL - Properties Dialog

B

BHARATH RAJAMANI

Need a macro to loop thru the GAL Address Book and write from the properties
- details dialog into a text file

(a) How to refer fields such as Direct Phone, Mobile etc from the different
tabs such as General, Organization, Phone/Address, Member of, E-mail
addresses in the GAL Properties details for each individual.

( I run Outlook 2000)

REFER:
Public Sub GetGAL()

Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.CreateTextFile("c:\testfile.txt", True)

Set myOlApp = CreateObject("Outlook.Application")
Set myNameSpace = myOlApp.GetNamespace("MAPI")
Set myGAddressList = myNameSpace.AddressLists("Global Address List")
Set myGEntries = myGAddressList.AddressEntries

For Each memberEntry In myGEntries
a.WriteLine memberEntry.Name
a.WriteLine memberEntry.Address
Next

a.Close

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top