VerySource

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 1061|回复: 2

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

[复制链接]

1

主题

1

帖子

2.00

积分

新手上路

Rank: 1

积分
2.00
发表于 2021-4-22 18:00:01 | 显示全部楼层 |阅读模式
如何在C/S中用LotusScript向Richtext域中插入数据库资源上的图片?

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

使用道具 举报

0

主题

1

帖子

2.00

积分

新手上路

Rank: 1

积分
2.00
发表于 2021-4-23 11:15:02 | 显示全部楼层
说清楚点,结构是什么样的,要如何导入,要不然没办法帮你。
回复

使用道具 举报

0

主题

1

帖子

2.00

积分

新手上路

Rank: 1

积分
2.00
发表于 2021-4-23 12:00:02 | 显示全部楼层
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
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

快速回复 返回顶部 返回列表