I have a daily-generated CSV file containing contact data which I want load entries into an Outlook contact file (overwriting the file each time, not appending). I know I can import the CSV file manually, but that’s a pain to do every day. Has anyone any ideas how I can automate the process (eg. by running a scheduled batch or exe file)? I am proficient in Python and Visual Foxpro, so if a programming solution is required, either of these languages would be preferable.
Also, I want to ensure that the imported fields are in the correct order. Where can I find a default field-mapping list for the contact file?
Any help would be appreciated.
Alan
If you can import the file manually, you can certainly automate it. With VFP, you’d create an instance of Outlook, instantiate the namespace, and then call on whatever the method is that imports the CSV.
One issue with automating Outlook is that it likes to protect itself from code touching some things and I wouldn’t be surprised if Contact records are among those. If this is for your own personal use, you could turn that protection off. The specifics depend on the version. In Outlook 2010, it’s File | Options, then Trust Center, then Programmatic Access.
Once you’ve got code that works, build an EXE, and use the Windows Task Scheduler to run it daily.
Tamar