|
发表于 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 |
|