I encountered the similar problem.
The JScript I used:
function getOutlookApp()
{
var outlook;
try
{
outlook = GetActiveOleObject( "Outlook.Application" );
}
catch( E )
{
outlook = new ActiveXObject( "Outlook.Application" );
}
return outlook;
}
function displayAppt( obj ){
out = getOutlookApp();
/* Create an Appointment Item */
appt = out.CreateItem( olAppointmentItem );
/* Transfer the data */
appt.Subject = obj.Subject;
appt.Location = obj.Location;
appt.Start = obj.Start;
appt.End = obj.End;
appt.ReminderMinutesBefore
appt.Body = obj.Body;
/* Display the data */
appt.Display();
}
function appt( Subject, Location, Start, End, ReminderMinutesBeforeStart
this.Subject = Subject;
this.Location = Location;
this.Start = Start;
this.End = End;
this.ReminderMinutesBefore
this.Body = Body;
}
My html is like this:
<html>
<head>
</head>
<script type="text/javascript" src="/xp/displayOutlookIte
</script>
<body onLoad=" displayAppt( new appt( 'subject','location','01-2
</body>
</html>
Through debugger, I know the error message " Automation server can't create object" happens here. Again when I enable IE's "Initialize and script ActiveX controls not marked as safe", everything works fine.
Is there anyway to work around this security control? Or how can I use an ActiveXObject is marked "safe" through JScript?
TIA
Chris
Main Topics
Browse All Topics





by: BillDLPosted on 2003-10-24 at 21:19:48ID: 9618708
It would help if you stated exactly what "script" you are trying to run.
Is this a script that is required to run on your system before you can gain access to a particular web page, or have you developed an application or online installer that, while you are testing it, creates the error message?
Have you simply tried:
Internet Options > Advanced > Disable "Script debugging"
Internet Options > Advanced > Disable "Display notification of every script error"