outlook超级难点,msg格式问题, 解决不了啊
时间:2010-12-24
来源:互联网
方法是asp程序读取outlook的 msg邮件内容。(本机环境:iis5)
本机上已经装了outlook组件,并已经给对应的权限,可是在创建Set myOlApp =Server.CreateObject("Outlook.Application") 的时候,有时候可以运行该程序,但有时候就假死在这个语句中了,创建不了,然后报错,脚本超时。不知道是什么问题呢??
还有就是在iis6上就一直没成功运行过该程序组件设置了和本机的一样,。
以下是asp代码(先本机装个ms outlook)
<% On Error Resume Next
'创建一个Outlook实例
Dim myOlApp,Filename
Filename="C:\11.msg"
set myOlApp = Nothing
If typeName(myOlApp)="Nothing" or typeName(myOlApp)="Empty" then
Set myOlApp =Server.CreateObject("Outlook.Application")
Else
Set myOlApp =GetObject("Outlook.Application")
End if
Set myItem = myOlApp.CreateItemFromTemplate(Filename)
fujianCount=myItem.Attachments.count
response.Write"内容: "& myItem.htmlBody &"<br>"
set myItem=Nothing
if err.number <> 0 then
response.write err.description
Else
response.Write("OK")
end if
set myOlApp = Nothing %>
[ 本帖最后由 any2002 于 2010-12-24 13:49 编辑 ]
本机上已经装了outlook组件,并已经给对应的权限,可是在创建Set myOlApp =Server.CreateObject("Outlook.Application") 的时候,有时候可以运行该程序,但有时候就假死在这个语句中了,创建不了,然后报错,脚本超时。不知道是什么问题呢??
还有就是在iis6上就一直没成功运行过该程序组件设置了和本机的一样,。
以下是asp代码(先本机装个ms outlook)
<% On Error Resume Next
'创建一个Outlook实例
Dim myOlApp,Filename
Filename="C:\11.msg"
set myOlApp = Nothing
If typeName(myOlApp)="Nothing" or typeName(myOlApp)="Empty" then
Set myOlApp =Server.CreateObject("Outlook.Application")
Else
Set myOlApp =GetObject("Outlook.Application")
End if
Set myItem = myOlApp.CreateItemFromTemplate(Filename)
fujianCount=myItem.Attachments.count
response.Write"内容: "& myItem.htmlBody &"<br>"
set myItem=Nothing
if err.number <> 0 then
response.write err.description
Else
response.Write("OK")
end if
set myOlApp = Nothing %>
[ 本帖最后由 any2002 于 2010-12-24 13:49 编辑 ]
作者: any2002 发布时间: 2010-12-24
问题1:Set myOlApp =Server.CreateObject("Outlook.Application") 这个语句有时到这里运行很慢,然后就超时错误。
问题2:iis6上就运行不起来
问题2:iis6上就运行不起来
作者: any2002 发布时间: 2010-12-24



作者: any2002 发布时间: 2010-12-24
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28