I need to reload (close and re-open) a document in order to show changes to a rich text field made in the back end.
before I even got to the code to change the rich text field, I wanted to be sure I can close and reopen the doc.
Here is the test code (in an action button):
Sub Click(Source As Button)
Dim ws As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Set uidoc = ws.CurrentDocument
Set doc = uidoc.Document
doc.SaveOptions = "0"
Call uidoc.Close
Set uidoc = doc.EditDocument(True , doc , False , "" ,True ,False)
End Sub
Every time I click the button, I get a “Wrong number of array subscripts” error on the EditDocument line.
Although I would prefer NOT to save the doc before I reload it, I have tried removing the SaveOptions line and saving both the front-end and back-end doc before closing it. I’ve played around with different params in the EditDocument method. All to no avail.
I could swear I’ve used this before, but I can’t understand what is causing this error. There is currently only one field on the form, and there is nothing else in any form events.
Any ideas?