基于lotus notes的公文管理系统,用notes客户端和id登录,如何快速将里面的收发的文件导出来
------解决思路----------------------
http://www.ibm.com/developerworks/cn/lotus/notes-attachment-export/
参考一下
------解决思路----------------------
Sub Initialize
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
Set db = New NotesDatabase( "SanFrancisco", "hill.nsf" )
Set view = db.GetView( "All Documents" )
Set doc = view.GetLastDocument
If doc.HasEmbedded Then
Forall o In doc.EmbeddedObjects
Messagebox( o.Name )
End Forall
Else
Messagebox "No embedded objects found"
End If
End Sub
2.
Dim doc As NotesDocument
Dim rtitem As Variant
Dim fileCount As Integer
Const MAX = 100000
fileCount = 0
'...set value of doc...
Set rtitem = doc.GetFirstItem( "Body" )
If ( rtitem.Type = RICHTEXT ) Then
Forall o In rtitem.EmbeddedObjects
If ( o.Type = EMBED_ATTACHMENT ) _
And ( o.FileSize > MAX ) Then
fileCount = fileCount + 1
Call o.ExtractFile _
( "c:\reports\newfile" & Cstr(fileCount) )
Call o.Remove
Call doc.Save( True, True )
End If
End Forall
End If