1.CopyItemToDocument
Set notesItem = notesItem.CopyItemToDocument( document, newName$ )
如:
Set itemA = doc.GetFirstItem( "Body" )
Set itemB = doc.GetFirstItem( "BriefDescription" )
Set memo = New NotesDocument( db )
Call itemA.CopyItemToDocument( memo, "Body" ) //新建memo文档,并新建body域,以item中的值作为值
Call itemB.CopyItemToDocument( memo, "Subject" )
Call memo.Send( False, "Cynthia Brainey" )
2.CopyAllItems
Call notesDocument.CopyAllItems( notesDocument [, replace ] )
Parameters:
notesDocument
The destination document.
replace
Boolean. If True, the items in the destination document are replaced. If False (default), the items in the destination document are appended.
Set docA = collection.GetFirstDocument()
If Not (docA Is Nothing) Then
Set docB = New NotesDocument( db )
Call docA.CopyAllItems( docB, True )
Call docB.Save( True, True )
Else
Messagebox "No documents found"
End If
添加新评论0 条评论