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:
00741285
Views:
24
>Here's the code:
>
>oOlApp = CreateObject("Outlook.Application")		&& Open Outlook
>oOlNS  = oOlApp.GetNameSpace("MAPI")			&& Set name space
>oOlC   = oOlNS.GetDefaultFolder(10)			&& 10 = Default Contacts Folder
>SELECT emcontact
>FOR i = 12 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
>
>
>On the insert statement, I get an "unknown name" message...
>
>See anything I'm doing wrong?

Do you have fewer than 12 contacts? If that's not the answer, beats me: when I changed the code to go from 1 to count, it ran fine for me.
My blog
My consulting page
My home page

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

Click here to load this message in the networking platform