Hi,
I have to rewrite this program in order to retrieve all fields from all contact folders.
Actually this sample program show me only a few fields from default contact folder.
I have to questions:
1) How can I obtain an Array that contains a list of all contact folders?
2) Ho can I ontain an Array containing all field in a contact
In this way I am able to nest tree for next
FOR iFolder := 1 TO oFolder:count
FOR iContact := 1 TO oContact:count
FOR iField := 1 TO oField:count
? FolderName, ContactName, ContactPhone, ContactEmail, etc, etc,
NEXT iField
NEXT iContact
NEXT iFolder
Thanks In advance
marco
#include "fivewin.ch"
#define olFolderContacts 10
FUNCTION MAIN()
LOCAL oOutlook := CREATEOBJECT( "Outlook.Application" )
LOCAL oNameSpace := oOutlook:GetNameSpace("MAPI")
LOCAL oContacts := oNameSpace:GetDefaultFolder( olFolderContacts )
LOCAL i
SET DATE BRITISH
FOR i = 1 TO oContacts:Items:Count
? oContacts:Items[ i ]:FullName , ;
oContacts:Items[ i ]:BusinessAddressStreet , ;
oContacts:Items[ i ]:BusinessAddressPostalCode , ;
oContacts:Items[ i ]:BusinessAddressCity , ;
oContacts:Items[ i ]:BusinessAddressState , ;
oContacts:Items[ i ]:BusinessAddressCountry , ;
oContacts:Items[ i ]:BusinessTelephoneNumber , ;
oContacts:Items[ i ]:Email1Address , ;
oContacts:Items[ i ]:LastModificationTime , ;
oContacts:Items[ i ]:Categories
NEXT
oOutlook:Quit()
RETURN NIL