Sometime we may need to import contact from client machine’s outlook, in this case we can write javascript to import outlook contacts easily. Here is the code how to do that.
var Const_olFolderContacts = 10;
var objApp = new ActiveXObject(“Outlook.Application”);
var objNS = objApp.GetNamespace(“MAPI”);
var colContacts = objNS.GetDefaultFolder(Const_olFolderContacts).Items
for( var i=1; i<=colContacts.count;i++)
{
var v = colContacts.item(i);
alert(v["FullName"]+” (“+v["Email1Address"]+”)”);
}
if this code does not [...]
Archive for the ‘Outlook’ Category
Retrieving Outlook Contact Lists using Javascript
Posted in Outlook, tagged import contacts, Outlook on March 14, 2008 | 6 Comments »

