M
Mohan
hello sir,
Please check the code down below.
<html>
<head>
<script language="JavaScript" type="text/JavaScript">
<!-- Enable Stealth Mode
// Variable Definitions
var nameSpace = null;
var mailFolder = null;
var mailItem = null;
var tempDoc = null;
var outlookApp = null;
function OpenOutlookDoc(whatform)
{
try
{
outlookApp = new ActiveXObject("Outlook.Application");
nameSpace = outlookApp.getNameSpace("MAPI");
mailFolder = nameSpace.getDefaultFolder(6);
mailItem = mailFolder.Items.add(whatform);
mailItem.Display(0)
}
catch(e)
{
// act on any error that you get
}
}
// Disable Stealth Mode -->
</script>
</head>
<body>
<form>
To use form buttons:<br>
<input type=button value="Form A" NAME="OutlookOpen1"
OnClick="OpenOutlookDoc('IPM.Note.leave request')"><br><br>
<!--
-->
</form>
</body>
</html>
If i save the above piece of code in a .htm file and execute it, i am
getting the "leave request" form properly loaded through the browser, but if
i save this page in a Web server(IIS) and if i try to access this page, the
form is not getting loaded in my machine. Both the Server(Exchange Server
2000 + IIS is installed) and the Client has outlook2000 installed. What
could be the problem? When i try to debugg the code, it get executes till
before the line "outlookApp = new ActiveXObject("Outlook.Application");, i
feel the problem is the ActiveX obj creation. What could be the reason? Is
it due to any security constraints? Please mail me.
"
Please check the code down below.
<html>
<head>
<script language="JavaScript" type="text/JavaScript">
<!-- Enable Stealth Mode
// Variable Definitions
var nameSpace = null;
var mailFolder = null;
var mailItem = null;
var tempDoc = null;
var outlookApp = null;
function OpenOutlookDoc(whatform)
{
try
{
outlookApp = new ActiveXObject("Outlook.Application");
nameSpace = outlookApp.getNameSpace("MAPI");
mailFolder = nameSpace.getDefaultFolder(6);
mailItem = mailFolder.Items.add(whatform);
mailItem.Display(0)
}
catch(e)
{
// act on any error that you get
}
}
// Disable Stealth Mode -->
</script>
</head>
<body>
<form>
To use form buttons:<br>
<input type=button value="Form A" NAME="OutlookOpen1"
OnClick="OpenOutlookDoc('IPM.Note.leave request')"><br><br>
<!--
-->
</form>
</body>
</html>
If i save the above piece of code in a .htm file and execute it, i am
getting the "leave request" form properly loaded through the browser, but if
i save this page in a Web server(IIS) and if i try to access this page, the
form is not getting loaded in my machine. Both the Server(Exchange Server
2000 + IIS is installed) and the Client has outlook2000 installed. What
could be the problem? When i try to debugg the code, it get executes till
before the line "outlookApp = new ActiveXObject("Outlook.Application");, i
feel the problem is the ActiveX obj creation. What could be the reason? Is
it due to any security constraints? Please mail me.
"