On the following code I am getting the error “The document is not in view ”. It is getting the handle to the doc I have selected just fine but produces the error on the line of code with the *.
Any ideas are greatly appreciated!
Sub Click(Source As Button)
Dim session As New NotesSession
Dim db As NotesDatabase
Set db = session.CurrentDatabase
Dim view As NotesView
Set view = db.GetView("All")
view.AutoUpdate = False
Dim doc As NotesDocument, doc2 As NotesDocument
Dim currNum As Integer
Set doc = session.DocumentContext
currNum = doc.SeqNum(0)
*Set doc2 = view.GetPrevDocument(doc)
doc.SeqNum = currNum - 1
doc2.SeqNum = currNum
Call doc.Save(False, False)
Call doc2.Save(False, False)
Call view.Refresh
End Sub