Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Import outlook contacts
Message
General information
Forum:
Visual FoxPro
Category:
Third party products
Miscellaneous
Thread ID:
00741270
Message ID:
00741298
Views:
21
>What version of VFP & Outlook worked for you? I have tried both VFP 7&8 and I have outlook 2002 SP1.

VFP 8, and O2K2 SP1.

Update: just tested with VFP7, and it worked fine there as well. Here's the exact code I'm using: I don't think it's different from yours, aside from the CREATE CURSOR line.
oOlApp = CreateObject("Outlook.Application")		&& Open Outlook
oOlNS  = oOlApp.GetNameSpace("MAPI")			&& Set name space
oOlC   = oOlNS.GetDefaultFolder(10)			&& 10 = Default Contacts Folder
CREATE CURSOR emcontact (ctName M, ctAddress M)
SELECT emcontact
FOR i = 1 TO oOlC.Items.Count		
  WAIT WIND "Record # "+ALLT(STR(i))+" of "+ALLT(STR(oOlC.Items.Count)) NOWAIT
  INSERT INTO emcontact (ctname, ctaddress) ;
       VALUES ;
       (oOlC.Items(i).email1address,;
       oOlC.Items(i).fullname)
ENDFOR
I did have to answer a few dialog boxes first, between my AV software and the Hell Patch: are you telling it to allow access whenever it asks?

Also, if you run the exact code in MSKB#Q269617, does it work or fail?
My blog
My consulting page
My home page

Member of the Trim Your Auto-Quote Campaign!
What's another word for thesaurus?
Previous
Reply
Map
View

Click here to load this message in the networking platform