Outlook 2007: Update the Contacts folder entries

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
 
K

Ken Slovak - [MVP - Outlook]

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.
 
P

paresh

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top