Sub Initialize()
On Error GoTo a
Dim session As New NotesSession
Dim db As NotesDatabase
Set db = session.Currentdatabase
Dim doc As NotesDocument
Set doc = New NotesDocument( db )
Dim rtitem As NotesRichTextItem
Set rtitem = New NotesRichTextItem( doc, "RTFBody" ) '这里的RTFBody是rtf域名,自己任意取名
Dim emobject As NotesEmbeddedObject
'将物理路径下的附件挂到rtf域当中
Set emobject=rtitem.EmbedObject(EMBED_ATTACHMENT,"","D:\图片1.png")
Call doc.Save(true,true)
Exit Sub
a:
MsgBox "错误在代理agent_attachment的第" & Erl & "行,描述:--" & error
End Sub
On Error GoTo a
Dim session As New NotesSession
Dim db As NotesDatabase
Set db = session.Currentdatabase
Dim doc As NotesDocument
Set doc = New NotesDocument( db )
Dim rtitem As NotesRichTextItem
Set rtitem = New NotesRichTextItem( doc, "RTFBody" ) '这里的RTFBody是rtf域名,自己任意取名
Dim emobject As NotesEmbeddedObject
'将物理路径下的附件挂到rtf域当中
Set emobject=rtitem.EmbedObject(EMBED_ATTACHMENT,"","D:\图片1.png")
Call doc.Save(true,true)
Exit Sub
a:
MsgBox "错误在代理agent_attachment的第" & Erl & "行,描述:--" & error
End Sub