【正文】
cLcDy = (p_txtFlowName,True) If docLcDy Is Nothing Then Call (PROMPT_OK, _ 錯誤, 未能找到+(0)+流程定義數(shù)據(jù),故無法繼續(xù)進行該項任務!, , ) Exit Function End If = = = Dim i As Integer Dim txtFldName As String For i = 1 To 4 39。4即最大步驟數(shù) txtFldName = txtStepName_+Trim$(Str$(i)) 39。步驟名 Call varCopyItem(p_docCur,docLcDy,txtFldName) txtFldName = txtRole_+Trim$(Str$(i)) 39。角色 Call varCopyItem(p_docCur,docLcDy,txtFldName) txtFldName = txtUsers_+Trim$(Str$(i)) 39。用戶 Call varCopyItem(p_docCur,docLcDy,txtFldName) txtFldName = txtEnableReject_+Trim$(Str$(i)) 39。是否允許駁回 Call varCopyItem(p_docCur,docLcDy,txtFldName) Next varGetLcDyInfo = True End FunctionFunction varCopyItem(p_docDes As NotesDocument,p_docSrc As NotesDocument,p_txtFldName As String)%REM 功能: 從另一文檔(源文檔)上拷貝指定欄位的值到本文檔(目的文檔)的相應欄位 參數(shù): p_docDes 目的文檔 p_docSrc 源文檔 p_txtFldName 欄位名 返回值: true 成功。 false 失敗 %END REM On Error Goto err01 Dim itemDes As NotesItem Dim itemSrc As NotesItem Set itemDes = (p_txtFldName) Set itemSrc = (p_txtFldName) = varCopyItem = Trueerr01: Exit FunctionEnd FunctionFunction varGetHandlerFromUsers(p_strRole As String,p_itemMembers As NotesItem,p_strIsParellel) As Variant%REM功能: 從某種身份的成員表中選擇若干人參數(shù): p_strRole 角色或身份 p_itemMembers 成員表 p_strIsParellel 1表示會簽(可選多人);否則不是返回: 從成員表中選擇的人注意:0,1,多人(此時要考慮是否會簽標志)的選擇情況不同%END REM Dim l_intMemNum As Integer l_intMemNum = 0 39。統(tǒng)計出成員的大致數(shù)目,0,1,或2位以上 Forall v In If v Then l_intMemNum = l_intMemNum + 1 If l_intMemNum = 2 Then Exit Forall 39。2位以上 End If End If End Forall If l_intMemNum = 0 Then varGetHandlerFromUsers = 39。沒有找到 Msgbox 對不起﹐沒有找到任何+p_strRole+! Exit Function End If If l_intMemNum = 1 Then 39。僅僅只有一點成員39。 If Messagebox(確實要將事項轉(zhuǎn)交給+p_strRole+(0)+﹖,4+32,詢問) 6 Then 39。沒有選擇Yes39。 varGetHandlerFromUsers = 39。不轉(zhuǎn)交當前事項39。 Exit Function39。 Else varGetHandlerFromUsers= (0) 39。轉(zhuǎn)交當前事項 Exit Function 39。 End If End If39。有兩個以上的成員可供選擇 Dim l_intPromptType As Integer If p_strIsParellel = 1 Then l_intPromptType =PROMPT_OKCANCELLISTMULT Else l_intPromptType = PROMPT_OKCANCELLIST End If varGetHandlerFromUsers = (l_intPromptType,_ 請選處理人, p_strRole,(0),) Exit FunctionEnd FunctionFunction varSelectStepHandler(p_docCur As NotesDocument,i As Integer) As Variant%REM功能: 選出正辦文檔的指定步驟的處理者參數(shù): p_docCur 正辦文檔 i 辦理流程的步驟返回: true 成功。 false 失敗注意: 可能覆蓋原處理者,但未選出新的處理者的話原處理者依然不變‘%END REM Dim txtFldName As String Dim itemRole As NotesItem txtFldName = txtRole_+Trim$(Str$(i)) 39。角色 Set itemRole = (txtFldName) Dim itemUsers As NotesItem txtFldName = txtUsers_+Trim$(Str$(i)) 39。用戶 Set itemUsers = (txtFldName) Dim txtHandler As String txtHandler = (0) = varGetHandlerFromUsers(,itemUsers,0) 39。從某種身份的成員表中選擇一人 If (0) = Then = txtHandler Exit Function End If varSelectStepHandler = TrueEnd FunctionFunction varGetStepLcDyInfo(p_docCur As NotesDocument,p_txtBaseFldName As String,i As Integer) As Variant%REM 功能: 找出指定項目的指定步驟的流程定義信息 參數(shù): p_docCur 包含有流程全過程定義信息的文檔 p_txtBaseFldname 保存某項目的流程定義信息的基準欄位名 i 步驟 返回: 指定項目的指定步驟的流程定義信息%END REM Dim txtFldName As String txtFldName = p_txtBaseFldName+Trim$(Str$(i)) 39。該項目的指定步驟的變量名 Dim itemFld As NotesItem Set itemFld = (txtFldName) varGetStepLcDyInfo = End FunctionFunction varComposeComment(p_txtOpinion As String,p_docCur As NotesDocument,p_txtCommentFld As String) As Variant%REM功能: 形成完成的意見參數(shù): p_txtOpinion 意向 p_docCur 當前文檔 p_txtCommentFld 意見欄位名 %END REM Dim itemComment As NotesItem Set itemComment = (p_txtCommentFld) Dim txtDatetime As String txtDatetime = Now Dim txtOpinion As String txtOpinion = p_txtOpinion If txtOpinion = Then txtOpinion = .. End If username1 = Evaluate ( @name([CN]。 + strUserName + ) ,pdocCur ) ([+txtOpinion+]+ + UserName1(0) + +txtDatetime)End Function(發(fā)文管理)workflow庫Sub Postopen(Source As Notesuidatabase) Dim workspace As New NotesUIWorkspace Call (Main) End Sub頁面Leftbottom @Command([FileCloseWindow]) ‘返回至上一層@PostedCommand([ViewShowSearchBar]) ‘搜索條@Command( [EditDocument] ) ‘編輯表單(Globals) LcDy@Command([FileCloseWindow]) ‘返回上一層@If(@Command([FileSave])。@Command([FileCloseWindow])。@Return()) ‘保存退出(Globals)存取控制表Sub Postopen(Source As Notesuidocument) Dim session As New NotesSession Dim db As NotesDatabase Dim acl As NotesACL Dim docCur As NotesDocument Set db = Set acl = Set docCur = Forall r In (AllJiaose).AppendToTextList(r) 39。收文登記者 End Forall End Sub%REM 表單操作:查看人員權(quán)限%END REMSub Click(Source As Button) Dim db As NotesDatabase Dim session As New NotesSession Dim docCur As NotesDocument Dim uidoc As NotesUiDocument Dim workspace As New NotesUIWorkspace Set uidoc = Set db = If (Person)= Then Messagebox 請先選擇人員姓名 Exit Sub End If Dim acl As NotesACL Dim entry As NotesACLEntry Set acl = Set entry = ( (Person) ) If entry Is Nothing Then Set entry = (default) End If tmpStr$ = Forall r In If tmpStr$= Then tmpStr$ = r Else tmpStr$ = tmpStr$ + , + r End If End Forall Call (JiaoSe,tmpStr$) If =ACLLEVEL_NOACCESS Then tmpStr$ = 不能存取者 End If If =ACLLEVEL_DEPOSITOR Then tmpStr$ = 存放者 End If If =ACLLEVEL_READER Then tmpStr$ = 讀者 End If If =ACLLEVEL_AUTHOR Then tmpStr$ = 作者 End If If =ACLLEVEL_EDITOR Then tmpStr$ = 編輯者 End If If =ACLLEVEL_DESIGNER Then tmpStr$ = 設(shè)計者 End If If =ACLLEVEL_MANAGER Then tmpStr$ = 管理者 End If Call (CtrlLevel,tmpStr$)End Sub%REM 表單操作:添加人員權(quán)限