Hi!
I have 2 richtext fields: Remarks and RemarksLog.
The program is suppose to move contents of the Remarks field to the RemarksLog everytime the document is saved.
I used BeginInsert method to do this. The debugger found no error to it but it does not transfer the contents to the RemarksLog field.
Here is the code I used:
I'd truly appreciate your help. Thanks!
I have 2 richtext fields: Remarks and RemarksLog.
The program is suppose to move contents of the Remarks field to the RemarksLog everytime the document is saved.
I used BeginInsert method to do this. The debugger found no error to it but it does not transfer the contents to the RemarksLog field.
Here is the code I used:
Code:
msgNote = uidoc.FieldGetText("remarks")
msg$ = Cstr (user + " (" + currDate + " " + currTime + ") - " + msgNote) '& Chr(13)
Set rtitem = currDoc.GetFirstItem("remarksLog")
Set rtnav = rtitem.CreateNavigator
nav = rtnav.FindFirstElement(RTELEM_TYPE_TEXTPARAGRAPH)
If nav Then
Call rtitem.BeginInsert(rtnav)
Call rtitem.AddNewline(1)
Call rtitem.AppendText("msg")
Call rtitem.EndInsert
End If
Call uidoc.FieldSetText("remarks","")
Call currDoc.Save(False,True)
I'd truly appreciate your help. Thanks!