Please help me, Can anyone tell me?
I will try to create a button to update in the Body field.
The content is a button that updates upward in the Body field, trying to be able to enter a message box, date and time, but it does not work as I write it above the Body field.
I thought that I should do BeginInsert, but it is difficult to update to the top of the Body field.
It does not work. I wonder if something is missing.
Message appear "V0002 VALIANT ....."
Is the sentence wrong?
-- script ----
Sub Click(Source As Button)
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim Datetime As Variant
Dim UserName As Variant
Dim Body As NotesRichTextItem
Dim rtnav As NotesRichTextNavigator
Set uidoc = workspace.CurrentDocument
Set rtnav = rt.CreateNavigator
Datetime = Now
NotesUser = UserName
Set doc = dc.GetFirstDocument
Set body = doc.GetFirstItem("Body")
Set rtnav = body.CreateNavigator
Call Body.BeginInsert(rtnav)
Call Body.AppendText( Cstr(ENTER) )
Call Body.AppendText( " -- " )
Call Body.AppendText( Cstr( Date ) )
Call Body.AppendText( " " )
Call Body.AppendText( Cstr( Time ) )
Call Body.AppendText( Cstr( UserName ) )
Call Body.AppendText( " -- " )
End Sub