Forum: สอบถามปัญหา Notes ทางด้านพัฒนาโปรแกรม (Note Client) |
Tags1: | Created on Mar 2, 2009, 9:55 AM by GeoSpherE/9Notes|Topic Responses: 6 |
&action=openDocument&documentId=2946 |
ข้อนี้ทำได้แล้วครับ
1. เช็คขนาด Attach File ทั้งหมดใน DB
Sub Initialize
Dim s As New NotesSession
Dim db As NotesDatabase
Set db = s.CurrentDatabase
Dim dc As NotesDocumentCollection
Set dc = db.Search({@AttachmentLengths > 0 } , Nothing , 0)
Dim doc As NotesDocument
Set doc = dc.GetFirstDocument
Dim filesize As Double
filesize = 0
Msgbox "run " + Cstr(dc.Count) + " documents"
While Not doc Is Nothing
v = Evaluate({@AttachmentLengths },doc)
filesize = filesize + v(0)
Set doc = dc.GetNextDocument(doc)
Wend
Msgbox filesize
End Sub |
|