Add Contacts to outlook using windows service

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to run a window service which collects the list of contacts from a
oracle database and updates to outlook contacts periodically.
I am using a Timer control to achieve the goal and the contacts are updated
to Outlook in timer__Elapsed event. when ever the code reaches the
Outlook.Application objOutlook = new ApplicationClass(); the timer is reset
and new timer_Elapsed event is generating, becuase the service is running in
a recursion.
Please let me know if we can call the outlook application from window
service, if yes how to resolve the above issue.

Thanks
 
Outlook is not suitable to automate from a service. You can try using CDO 1.21 instead, but it is much more difficult to create a contact; see http://www.cdolive.com/cdo10.htm for some of the fields involved.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Back
Top