Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Import outlook contacts
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Third party products
Title:
Import outlook contacts
Miscellaneous
Thread ID:
00741270
Message ID:
00741270
Views:
53
OK, I must be having a bad day....this code worked fine for my journal items, but when I adapt it to get contacts, Outlook doesn't have a clue what I'm talking about!

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?

Thanks in advance.
Steve Howie, owner
DaSH Technology
Denver, CO
Next
Reply
Map
View

Click here to load this message in the networking platform