我在笔记电子邮件正文中创建了一个用于投票的按钮,然后将其发送给一组成员进行投票。当用户投票时,他们会为脚本的每个操作获得执行安全警报。以下是放置在“是”按钮中的代码。
Dim session As New notessession
Dim ws As New notesuiworkspace
Dim db As notesdatabase
Dim doc_poll As NotesDocument
Set db = session.getDatabase("Server Name", "ApplicationTesting/Polling.nsf")
Set doc_poll = db.CreateDocument()
Dim uidoc As NotesUIDocument
Set uidoc = ws.CurrentDocument
Dim doc As notesdocument
Set doc = uidoc.Document
If doc.temp(0) <> "yes" Then
v_val= ws.Prompt(3,"Family member count","No of Members ?")
Call doc.ReplaceItemValue("temp","yes")
Call doc.Save(True,True)
Call doc.Sign
Call doc.Save(True,True)
doc_poll.Form = "Fo-PollReport"
Call doc_poll.ReplaceItemValue("etxtUserName", session.CommonUserName )
Call doc_poll.ReplaceItemValue("etxtMembers", Cint(v_val))
Call doc_poll.save(True,False)
Messagebox"Your voting has been sent to HR", 64,"Voting"
Else
Messagebox "Your voting is already been sent to HR. Please contact HR directly,in case of any change in voting ",16, "Voting"
End If
如何避免执行安全警报?