UIDoc editing after RT backend modification

I would like to insert a table in a rich text field (currently working with another agent) then be able to update that table by adding another row (containing date, count, and user - already working).

The tricky part is reopening the document for further editing - even though I close the document and uidoc, and delete them, and create a new workspace, if I try to save after re-opening the backend doc, I invariably end up with a save error. It appears that the form properties deal with merge conflicts, but not save conflicts.

Below is the code pertaining to saving, closing, and reopening the document with the changes. The table row is added, the content is added in the cells, but I am unable to save without conflict.

Any ideas would be sincerely appreciated. Thanks.

Sub Initialize

Dim session As New NotesSession

Dim workspace As New NotesUIWorkspace

Dim db As NotesDatabase

Set db = session.CurrentDatabase

Dim uidoc As NotesUIDocument

Dim uidocnew As notesuidocument

Set uidoc = workspace.CurrentDocument

Call uidoc.Save

uidoc.EditMode = False

Dim doc As NotesDocument

Dim docnew As NotesDocument

Set doc = uidoc.Document



docunid = doc.UniversalID

. . .

'manipulate RT field

. . .

Call doc.Save(True, True)	'get rid of old doc

Call uidoc.Close				'close and reopen doc so changes appear on table

doc.saveoptions = "0"

Delete doc

Delete uidoc



' display the table 

Dim ws As New NotesUIWorkspace	

Set docnew = db.GetDocumentByUNID(docunid)

Set uidocnew = ws.EditDocument(True, docnew)

End Sub

Subject: UIDoc editing after RT backend modification

see this: Tip: How to update rich text in a document that’s open and redisplay it without saving.

Subject: RE: UIDoc editing after RT backend modification

Thank you much for your help. I merged your ideas with mine, and came up with a solution. My situation may be a bit different with a specified target frame, but the $SaveOptions was critical. My changes are shown in a response to your Tip.

Again, thanks a million.