網頁

2013年12月4日 星期三

[AP] 限制人員誤在view做 Ctrl+C & Ctrl+V

'//若要限制人員誤在view做 Ctrl+C & Ctrl+V,則.....
在視界的Querypaste 設條件

'//寫法一
Sub Querypaste(Source As Notesuiview, Continue As Variant)
Continue = false

End Sub


'//寫法二
Sub Querysave(Source As Notesuidocument, Continue As Variant)

Dim doc As NotesDocument
Set doc=Source.document

If Not Source.IsNewDoc Then
If ( doc.Save( False, False ) = False ) Then
Messagebox {此文件正在被其他人修改中,請待會再打開並修改此文件.},,"注意! 文件修改中!"
Continue=False
Call Source.Close
End If
End If

End Sub

沒有留言:

張貼留言