Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Importing Outlook Address Book Groups
Message
De
17/05/2005 14:31:47
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Importing Outlook Address Book Groups
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01015018
Message ID:
01015018
Vues:
66
I am using the following code (taken from John Koziol's ROC program) to import addresses into a foxpro table:
oOlApp = CreateObject("Outlook.Application")		&& Open Outlook
oOlNS  = oOlApp.GetNameSpace("MAPI")			   && Set name space
oOlC   = oOlNS.GetDefaultFolder(10)					&& 10 = Default contacts folder
SELECT vfpcontacts
FOR i = 1 TO oOlC.Items.Count		
  WAIT WIND "Record # "+ALLT(STR(i))+" of "+ALLT(STR(oOlC.Items.Count)) NOWAIT
  INSERT INTO vfpcontacts (lastname,firstname,fullname,company,email1addr,email1disp,;
                           email2addr,email2disp,email3addr,email3disp,nickname) ;
                           VALUES ;
                          (oOlC.Items(i).LastName,;
                           oOlC.Items(i).FirstName,;
                           oOlC.Items(i).FullName,;
                           oOlC.Items(i).CompanyName,;
                           oOlC.Items(i).Email1Address,;
                           oOlC.Items(i).Email1DisplayName,;
                           oOlC.Items(i).Email2Address,;
                           oOlC.Items(i).Email2DisplayName,;
                           oOlc.Items(i).Email3Address,;
                           oOlC.Items(i).Email3DisplayName,;
                           oOlC.Items(i).NickName)
                          
ENDFOR
This works fine until it reaches a group list in my address book. At which point it returns and error. I can ignore the error and it will continue until it reaches the next group.

1. Is there a way to import the group into a foxpro table? If so, suggestions would be appreciated.

2. If not, how can I determine that the address book entry is a group and ignore it?

Thanks in advance for your help!
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform