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放入当前文档数据库。

你可能感兴趣的:(职场,休闲,domino)