从文档中分离excel附件到磁盘,再打开该xls文件
2011-08-03 10:52
197 查看
Dim s As New notessession
Dim db As notesdatabase
Dim view As NotesView
Dim doc As NotesDocument
Dim neo As NotesEmbeddedObject
Dim temVar As Variant
Dim rtitem As NotesRichTextItem
'Dim tempNeo As NotesEmbeddedObject
Set db = s.CurrentDatabase
Set view = db.GetView("dywdgl(bytime)")
Set doc = view.GetFirstDocument
If doc.HasEmbedded Then
Msgbox("有附件")
End If
Set rtitem = doc.GetFirstItem( "zhengwen" )
Forall o In rtitem.EmbeddedObjects
'把附件拆出来
Call o.ExtractFile("d:\Lotus\Domino\Data\"+o.Name)
End Forall
Set excelapplication = CreateObject ( "Excel.Application")
Set excelworkbook = excelapplication.Workbooks.Open ("d:\123.xls")
Messagebox ("已经打开xls文件")
excelworkbook.close(False)
excelapplication.quit
Set excelapplication=Nothing
Dim db As notesdatabase
Dim view As NotesView
Dim doc As NotesDocument
Dim neo As NotesEmbeddedObject
Dim temVar As Variant
Dim rtitem As NotesRichTextItem
'Dim tempNeo As NotesEmbeddedObject
Set db = s.CurrentDatabase
Set view = db.GetView("dywdgl(bytime)")
Set doc = view.GetFirstDocument
If doc.HasEmbedded Then
Msgbox("有附件")
End If
Set rtitem = doc.GetFirstItem( "zhengwen" )
Forall o In rtitem.EmbeddedObjects
'把附件拆出来
Call o.ExtractFile("d:\Lotus\Domino\Data\"+o.Name)
End Forall
Set excelapplication = CreateObject ( "Excel.Application")
Set excelworkbook = excelapplication.Workbooks.Open ("d:\123.xls")
Messagebox ("已经打开xls文件")
excelworkbook.close(False)
excelapplication.quit
Set excelapplication=Nothing
相关文章推荐
- excel 打开文件提示“您尝试打开的文件xxx.xls的格式与文件扩展名指定的格式不一致”的解决办法
- 让网页附件为Word或Excel的文件,下载时直接弹出下载对话框,而不打开它
- Excel 2010无法打开xls文件!说文件已损坏 解决方法
- 设置默认移动端打开pdf,doc,xls等文件附件的打开方式
- Python中,添加写入数据到已经存在的Excel的xls文件,即打开excel文件,写入新数据
- Word在试图打开文件时遇到错误请尝试下列方法 *检查文档或驱动器的文件权限*确保有足够的内存和磁盘空间,
- 【整理】Python中,添加写入数据到已经存在的Excel的xls文件,即打开excel文件,写入新数据
- ASP.NET导出Excel,打开Excel文件时提示“您尝试打开文件'XXX.xls'的格式与文件扩展名指定文件不一致”
- 右键新建excel文档无法打开,提示“文件格式或扩展名无效”
- outlook2003 无法打开附件中的excel文件
- 操作系统为英文下打开.xls文件乱码问题(注:文档中的字为繁体,用WPS打开正常显示)
- Mac中OSX系统打开了邮件附件中的excel文件之后琐机之后无法登陆的问题
- 内存或磁盘空间不足,Microsoft Office Excel 无法再次打开或保存任何文档 问题的一种解决办法
- Process Start打开excel文档显示显示因为文件格式或文件扩展名无效
- 打开excel2007文档时显示“excel无法打开文件~$book.xltm”
- 解决打开Excel时提示“您尝试打开的文件**.xls的格式与文件扩展名指定的格式不一致
- 内存或磁盘空间不足,Microsoft Office Excel 无法再次打开或保存任何文档。 [问题点数:20分,结帖人wenyang2004]
- 打开Excel时提示"您尝试打开的文件**.xls的格式与文件扩展名指定的格式不一致"
- ios 使用NSURlSession 下载文件并且使用进度条进行文件下载进度读取以及打开附件(word,excel,ppt,pdf)显示
- 内存或磁盘空间不足,Microsoft Office Excel 无法再次打开或保存任何文档 问题解决