VBScript与Outlook交互问题
阿福123 2007-03-10 11:00:30 想在网页中操作Outlook,代码如下:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<script language="vbscript">
<!--
Function CanDeliver()
Dim app
Dim taskItem
Set app = CreateObject("Outlook.Application")
Set taskItem = app.CreateItem(Outlook.OlItemType.olTaskItem)
taskItem.Body = "hello ~~"
taskItem.Save
MsgBox ("OK!")
End Function
-->
</script>
</head>
<body>
<FORM NAME="Form1">
<INPUT TYPE="Button" NAME="Button1" VALUE="单击">
<SCRIPT FOR="Button1" EVENT="onClick" LANGUAGE="VBScript">
CanDeliver()
</SCRIPT>
</FORM>
</body>
</html>
得到一个提示错误:
Line:11
Char:5
Code:0
Error:缺少对象: 'Outlook'
问题是,我怎么在IE里面加载Outlook的ActiveX???
另外我在Outlook的VB编辑器里面也找不到VBScript的编辑器,“外接程序”是空的,要怎么加载VBScript编辑器呢???