- 论坛徽章:
- 0
|
请教为何BUTTON不能实现操作功能, 老是出错,但不知道是错在哪里?
CODE:
Sub Click(Source As Button)
If Not(doc.ReviewMember(0) = session.UserName) Then
res = Msgbox("You are not the checker. Are you sure to end the check up?" , 1+48, "Check")
If res = 2 Then Exit Sub
End If
EditFlag = "1"
uidoc.EditMode = True
doc.DateToReviewed = Today
doc.ReviewedBy = session.UserName
Call doc.Save( False, True )
Call uidoc.Reload
Call uidoc.Refresh
Call uidoc.Save
Call uidoc.Close
End Sub
CODE:
Sub Querymodechange(Source As Notesuidocument, Continue As Variant)
Set ws = New NotesUIWorkspace
Set uidoc = ws.CurrentDocument
Set doc = uiDoc.Document
If ( doc.DocStatus(0) = "Enforce" ) Or ( doc.DocStatus(0) = "Old" )Then
If Not ( uiDoc.EditMode ) Then
If Not doc.HasItem("Action") Then
Messagebox "This document already has been issue. You can not edit"
continue = False
Else
End If
End If
End If
End Sub |
|