|
-
Jun 26th, 2003, 10:22 AM
#1
Thread Starter
Lively Member
Loop thru GAL
How do I obtain the GAL, and then loop thru it.
Dim myOlApp As Outlook.Application
Dim myItem As Outlook.MailItem
Dim myRecipient As Outlook.Recipient
Dim myGAL as i dont know what
Dim strUser as String
myOlApp = CreateObject("Outlook.Application")
myItem = myOlApp.CreateItem Outlook.OlItemType.olMailItem)
myRecipient = myItem.Recipients.Add(strUser)
myGAL = ???????????????
thanks duders
db
-
Jun 26th, 2003, 10:33 AM
#2
Thread Starter
Lively Member
i figured it out
heres the code
Dim myOlApp As Outlook.Application
Dim myItem As Outlook.MailItem
Dim myRecipient As Outlook.Recipient
Dim myGAL As Outlook.NameSpace
Dim myLists As Outlook.AddressLists
Dim myList As Outlook.AddressList
Dim i As Integer
myOlApp = CreateObject("Outlook.Application")
myItem = myOlApp.CreateItem(Outlook.OlItemType.olMailItem)
myRecipient = myItem.Recipients.Add("briandda")
myGAL = myOlApp.GetNamespace("MAPI")
myLists = myGAL.AddressLists()
For i = 1 To myLists.Count - 1
myList = myLists.Item(i)
If myList.Name = "Global Address List" Then
do whatever
End If
Next
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
|