dispalying the Global Address list from OUTLOOK on a VB Program
dispalying the Global Address list from OUTLOOK on a VB Program
dispalying the Global Address list from OUTLOOK on a VB Program
dispalying the Global Address list from OUTLOOK on a VB Program
dispalying the Global Address list from OUTLOOK on a VB Program
dispalying the Global Address list from OUTLOOK on a VB Program dispalying the Global Address list from OUTLOOK on a VB Program dispalying the Global Address list from OUTLOOK on a VB Program dispalying the Global Address list from OUTLOOK on a VB Program dispalying the Global Address list from OUTLOOK on a VB Program dispalying the Global Address list from OUTLOOK on a VB Program dispalying the Global Address list from OUTLOOK on a VB Program dispalying the Global Address list from OUTLOOK on a VB Program
dispalying the Global Address list from OUTLOOK on a VB Program dispalying the Global Address list from OUTLOOK on a VB Program
dispalying the Global Address list from OUTLOOK on a VB Program
Go Back  Xtreme Visual Basic Talk > > > dispalying the Global Address list from OUTLOOK on a VB Program


Reply
 
Thread Tools Display Modes
  #1  
Old 12-16-2002, 10:51 AM
Small Mind's Avatar
Small Mind Small Mind is offline
Centurion
 
Join Date: Oct 2002
Posts: 174
Default dispalying the Global Address list from OUTLOOK on a VB Program


How can I display the Global Address List in a VB program?
Reply With Quote
  #2  
Old 12-18-2002, 12:49 AM
ohmyigod
Guest
 
Posts: n/a
Cool

Here's the source code for ur requirement

Private Sub cmdDisplay_Click()
Dim objmapiSession As MAPI.Session
Dim objmapiAddressList As AddressList
Dim objmapiAddressEntries As AddressEntries
Dim objmapiAddressEntry As AddressEntry
' Create a new MAPI Session
Set objmapiSession = New MAPI.Session

'Logon to the MS Exchange server
objmapiSession.Logon

'Get the Global Address List
Set objmapiAddressList = objmapiSession.GetAddressList(CdoAddressListGAL)

'Get the Addresses Collection
Set objmapiAddressEntries = objmapiAddressList.AddressEntries

' Loop through each address object
For Each objmapiAddressEntry In objmapiAddressEntries
Debug.Print objmapiAddressEntry.Name + vbTab + "(" + objmapiAddressEntry.Address + ")"
Next
'Log off
objmapiSession.Logoff

Set objmapiSession = Nothing
Set objmapiAddressList = Nothing
End Sub

Note: Don't forget to add reference to MS CDO Library

cheers
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
dispalying the Global Address list from OUTLOOK on a VB Program
dispalying the Global Address list from OUTLOOK on a VB Program
dispalying the Global Address list from OUTLOOK on a VB Program dispalying the Global Address list from OUTLOOK on a VB Program
dispalying the Global Address list from OUTLOOK on a VB Program
dispalying the Global Address list from OUTLOOK on a VB Program
dispalying the Global Address list from OUTLOOK on a VB Program dispalying the Global Address list from OUTLOOK on a VB Program dispalying the Global Address list from OUTLOOK on a VB Program dispalying the Global Address list from OUTLOOK on a VB Program dispalying the Global Address list from OUTLOOK on a VB Program dispalying the Global Address list from OUTLOOK on a VB Program dispalying the Global Address list from OUTLOOK on a VB Program
dispalying the Global Address list from OUTLOOK on a VB Program
dispalying the Global Address list from OUTLOOK on a VB Program
 
dispalying the Global Address list from OUTLOOK on a VB Program
dispalying the Global Address list from OUTLOOK on a VB Program
 
-->