| 发表于:2007-10-09 16:17:392楼 得分:50 |
根据上面提供的代码,我做了一个cs下的.测试通过. sub initialize on error goto exitsub dim s as new notessession dim doc as notesdocument dim view as notesview dim db as new notesdatabase( "", "" ) call db.open( "diligence", "testingdb/ht1testdb1.nsf" ) set view = db.getview("testview1") set doc = view.getfirstdocument if not (doc is nothing) then dim object as notesembeddedobject dim strname as variant strname=evaluate("@attachmentnames", doc) forall v in strname set object = doc.getattachment( v ) if not ( object is nothing ) then if s.platform="windows/32" then msgbox "平台:windows;开始拆离!" call object.extractfile("c:\quarantine\" & v) msgbox "拆离完成!" else msgbox "未得到对象" end if end if end forall call doc.remove(true) else msgbox "文档不存在." end if exit sub exitsub: messagebox "error:" & error$ & chr(13) + "line:" + cstr(erl) exit sub end sub 设置的是定时代理. | | |
|