Hi… I am trying to add some text and a doclink to a rich text field (depmi) on a document (currdoc). The following code seems to work… as I step through it, I watch value of the depmi field in the debugger, and it appears to get the values that I want. However, when I go to save the document, the value is gone and the field is empty. What am I doing wrong??
Dim ws As New NotesUIWorkspace
Dim dc As NotesDocumentCollection
Dim uidoc As NotesUIDocument
Dim currdoc As NotesDocument
Dim doc As NotesDocument
Dim rtitem As Variant
Set uidoc = ws.CurrentDocument
Set currdoc = uidoc.Document
Set dc = ws.PickListCollection(PICKLIST_CUSTOM, True, "", "v_dir\votes.nsf", "(Depend)", "Select Milestone Dependencies", "Select", "Milestone")
Set doc = dc.GetFirstDocument
While Not (doc Is Nothing)
Set rtitem = currdoc.GetFirstItem("depmi")
Call rtitem.AppendText(doc.title(0))
Call rtitem.AppendDocLink(doc, "Link")
Call rtitem.AddNewline(1)
Call currdoc.Save(True, False)
Set doc = dc.GetNextDocument(doc)
Wend