domino中实现将本地文件放入数据库中的LS代码

domino中实现将本地文件放入数据库中的LS代码
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim rtitem As NotesRichTextItem
Dim object As NotesEmbeddedObject
Set db = session.CurrentDatabase
Set doc = New NotesDocument(db)
Set rtitem = New NotesRichTextItem( doc, “Body” + i )
Set object = rtitem.EmbedObject _
( EMBED_ATTACHMENT, “”, “c:\test.txt”)
doc.Form = “nup”
doc.Subject = “Here’s Jim’s document, as an attachment”
Call doc.Save( True, True )
End Sub

该代码实现把本地文件c:\test.txt放入当前文档数据库。

打赏

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注