"Automation server can not create object"
Hai,
Now want to create outlook object in server application. following sample code i am using now.
<html>
<head>
<title> Naga Test </title>
<script language="JavaScript" type="text/JavaScript">
<!--
var nameSpace = null;
var outlookApp = null;
var apptFolder = null;
var apptItem = null;
function AddCalendarAppointment()
{
//
outlookApp = new ActiveXObject("Outlook.Application"); // This Line not Executed ,after it return Object Expected error.
//
nameSpace = outlookApp.getNameSpace("MAPI");
apptFolder = nameSpace.getDefaultFolder(9);
apptItem = apptFolder.Items.add("IPM.Appointment");
try
{
apptItem.Subject ="SDFSDSFDS";
apptItem.Body = "sdfsf";
apptItem.Location = "sdfsfdsdf";
apptItem.Start = "12:00 PM"+"12-05-2008";
apptItem.End ="12:30 PM"+"12-05-2008";
apptItem.Save();
}
catch(e)
{
alert("Enable your ActiveX controls " +e);
}
}
//-->
</script>
</head>
<body>
<OBJECT classid="clsid:99B42120-6EC7-11CF-A6C7-00AA00A47DD2" CODEBASE="http://www.microsoft.com/ie/download/activex/ielabel.ocx#version=3D4,70,0,1086"
id=sprlbl1
width=50
height=200
align=left
hspace=20
vspace=0 >
</OBJECT>
<input type="button" name="submit" value="SubmitBug" onClick="AddCalendarAppointment()" />
</body>
</html>
This code without server(normal IE) successfully executed. but when i deploy apache tomcat server this same code, error is occur(Automation server can not create object). How to resolve this error.
please response me. thanks
Regards
N.Nagaraj
nagaraj
|