专注收集记录技术开发学习笔记、技术难点、解决方案
网站信息搜索 >> 请输入关键词:
您当前的位置: 首页 > Lotus

怎么在C/S中用LotusScript向Richtext域中插入数据库资源上的图片

发布时间:2010-06-13 13:46:30 文章来源:www.iduyao.cn 采编人员:星星草
如何在C/S中用LotusScript向Richtext域中插入数据库资源上的图片?
如何在C/S中用LotusScript向Richtext域中插入数据库资源上的图片?

用Import能导入外部文件,但没有办法导入数据库资源里的图片。

------解决方案--------------------
Sub Initialize
On Error Goto errhandle
Dim ss As New NotesSession
Dim db As NotesDatabase
Dim nc As NotesNoteCollection
Dim noteId As String
Dim docImage As NotesDocument
Dim item As NotesItem
Dim img As String
Dim context As NotesDocument
Dim imgitem As NotesItem
Dim count As Integer

count=0
Set context=ss.DocumentContext
Set imgitem=context.GetFirstItem( "ImageList ")
Set db=ss.CurrentDatabase
Set nc=db.CreateNoteCollection(False)
Call nc.SelectAllFormatElements(False)
nc.SelectImageResources = True
Call nc.BuildCollection

noteId = nc.GetFirstNoteId
Do While Not noteId = " "
count=count+1
Set docImage = db.GetDocumentByID(noteId)
img= docImage.GetItemValue( "$TITLE ")(0)
Call imgitem.AppendToTextList( "图片 "+Cstr(count)+ "| "+img)
noteId = nc.GetNextNoteId(noteId)
Loop
Exit Sub
errhandle:
Print Error$
Print Erl()
End Sub
友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。

其他相似内容:

热门推荐: