Hello,
I have a button in the view from this I am selecting some documents and sending mail to concerned person and changing the status of the document.I am using here worspace view.refresh method for refreshing the view.But after refreshing also the selection mark is still visible for the selected documents. I dont want the tick mark to stay like that .After I close and open the db then tick mark wont appear.
Please help me out.
Sub Click(Source As Button)
Dim workspace As New NotesUIWorkspace
Dim session As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim person As NotesName
Dim loggeduser As String
Dim ret As Integer
Dim MailAddress() As String
Dim Msg As String
Dim NL As String
Set db = session.CurrentDatabase
Set collection = db.UnprocessedDocuments
Set doc = collection.GetFirstDocument()
Dim boxType As Long, answer As Integer
boxType& = MB_YESNO + MB_ICONQUESTION
If(collection.count<>0) Then
answer% = Messagebox("You have clicked on Request To Destroy button, Do you want to sent the request to destroy the record?", boxType&, _
"Continue?")
If(answer%="6") Then
While Not(doc Is Nothing)
Set person = New NotesName(doc.txtName(0))
loggeduser=session.username
If(person.canonical=loggeduser) Then
doc.txtstatus="Request To Destroy"
'doc.dtdestroy=Now
doc.txtHistory = doc.txtHistory(0) + Chr(13) + session.commonusername+" " +"sent a Request for Destroying the record"+" " + "on"+" "+Cstr(Now)
Call doc.save(True,False)
Else
Messagebox "Actual Requestor can only change the status of the document",,"Exit"
Goto nextdoc
End If
Set Person=session.createname(doc.GetItemValue("txthead")(0))
Ret = 0
NL = Chr(10) & Chr(13)
Msg = "Acknowledgement could not be sent to " & Person.Common & NL &_
" for technical reasons."
Call SendHod("Request To Destroy", doc, MailAddress(), Ret)
If Ret < 0 Then
Messagebox Msg, 48, "Email"
Else
doc.txthodstatus="Awaiting HOD Approval"
End If
nextdoc:
Set doc = collection.GetNextDocument(doc)
Wend
End If
End If
Call workspace.Viewrefresh
End Sub