I am using This code to attach any file to Outlook, This is working fine with IE But in other Browser it's not working.
<html>
<head>
<script type="text/javascript">
function OpenOutlookDoc()
{
var xmlhttp;
try
{
if (window.XMLHttpRequest)
{
outlookApp=new XMLHttpRequest("Outlook.Application");
}
var outlookApp = new ActiveXObject("Outlook.Application");
var nameSpace = outlookApp.getNameSpace("MAPI");
mailFolder = nameSpace.getDefaultFolder(6);
mailItem = mailFolder.Items.add('IPM.Note.FormA');
mailItem.Attachments.Add ("C:\\Users\\bhaskeak\\Desktop\\temp\\Doc.docx");
mailItem.Attachments.Add ("D:\\Capaaature.png");
mailItem.display (0);
}
catch(e)
{
alert(e);
// act on any error that you get
}
}
</script>
</head>
<body>
<a href="javascript:OpenOutlookDoc()">Click</a>
</body>
</html>
Please Help me Gave some solution so that it will work in other Browser