Archive for the ‘Outlook’ Category

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 works , please do the following so it should work

In Internet Explorer , go to Tools | Internet Options | Security  -> from ‘Custom Level’ go to ‘Initialize and script ActiveX controls not marked as safe for scripting’ and select ‘Prompt” — this should work now

have got a big detailes code here, you can check this too another code


Read Full Post »