Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Manipulate address book in microsoft outlook
Message
From
26/01/2004 06:35:34
 
 
To
25/01/2004 20:42:42
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00870460
Message ID:
00870513
Views:
7
Hello Irwan.

how do i manipulate address book data in microsoft outlook
LOCAL loOutlook, loNamespace, loAddressBook AS Outlook.MAPIFolder, loContact AS Object, lnContactCount, laContacts[ 1 ]

loOutlook = CREATEOBJECT( 'Outlook.Application' )
loNamespace = loOutlook.GetNamespace( 'MAPI' )

*** Get a reference to the contacts folder
loAddressBook = This.oNameSpace.GetDefaultFolder( 10 )  && olFolderContacts
IF VARTYPE( loAddressBook ) = 'O'
  lnContactCount = 0
  
  *** Get info about each contact into the array
  FOR EACH loContact IN loAddressBook.Items
    WITH loContact
      *** Make sure we only get individual contacts
      *** and skip any distribution lists
      IF .Class = 40    && olContact
        lnContactCount = lnContactCount + 1
	DIMENSION laContacts[ lnContactCount, 4 ]
	laContacts[ lnContactCount, 1 ] = .LastName
	laContacts[ lnContactCount, 2 ] = .FirstName
	laContacts[ lnContactCount, 3 ] = .Email1Address
	laContacts[ lnContactCount, 4 ] = .FullName
      ENDIF
    ENDWITH
  ENDFOR
  ASORT( laContacts )
ENDIF
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform