现在希望如果某篇文档在编辑结束后(该文档已经保存),如果某域为空,则将其删除,应该如何处理??
eino 2002-12-05 10:10:22 问题:能否在表单中删除文档
具体描述:
现在希望如果某篇文档在编辑结束后(该文档已经保存),如果某域为空,则将其删除,应该如何处理??
直接使用 call uidoc.document.remove(false)不可用,使用如下方法在操作(click)、QueryClose、Terminate、(Global) Terminate中,以下代码均不能实现。
示例:
Sub Click(Source As Button)
If doc.fieldXm(0)="" Then
If Messagebox( "联系人姓名无效,放弃这条信息吗?" ,4+64+256 ,"用户提示!!") = 7 Then
continue=False
Else
Dim unid As String
unid=doc.UniversalID
Dim delDoc As notesdocument
Call uidoc.close
Call ws.viewrefresh
Set delDoc = db.GetDocumentByUNID( unid )
Call delDoc.remove(True)
End If
End If
End Sub
错误提示:
Cannot remove NotesDocument when instantiated by NotesUIDocument
盼回复!!