Outlook 2007: Update the Contacts folder entries

  • Thread starter Thread starter paresh
  • Start date Start date
P

paresh

Hi, I know how to update the contacts folder entries by writing Add-in or VBA
macro but I am looking for writing independent application so that user just
need to run it to update all Contacts folder entries.

I am not sure whether Outlook allows reading Contacts folder using such
application but I would be happy if there is any possibility.

Thanks,
Paresh
 
You can access Outlook data from a standalone program, of course. Depending
on the Outlook version, how you write the code, what language and what API
you use you might get security prompts, but that can be avoided.
 
Thanks Ken. I have written simple program to store new contact. I stored it
as .VBS file. But when I run, it doesn't create the contact. Could you please
let me know what could be wrong in below code:

Dim newContact' As contactItem
Dim olkApp
Const olFolderContacts = 10
Const olContactItem = 2
Set olkApp = CreateObject("outlook.application")
Set newContact =
olkapp.Session.GetDefaultFolder(olFolderContacts).Items.Add(olContactItem)
newContact.FullName = "XYZ"
newContact.BusinessTelephoneNumber = "74000"
newContact.Save

Thanks.
 
Back
Top