This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal


Apr 15, 2018, 12:08 PM
1 Posts
topic has been resolvedResolved

How can I add it to the top of the Body field?

  • Category: Domino Designer
  • Platform: Windows
  • Release: 9.0.1
  • Role: End User
  • Tags:
  • Replies: 2

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

Apr 16, 2018, 10:41 PM
323 Posts
It's missing positioning and EndInsert.

https://www.ibm.com/support/knowledgecenter/SSVRGU_8.5.3/com.ibm.designer.domino.main.doc/H_EXAMPLES_BEGININSERT_METHOD_RTITEM.html

 

Set body = doc.GetFirstItem("Body")

Set rtnav = body.CreateNavigator
Call rtnav.FindFirstElement(RTELEM_TYPE_TEXTPARAGRAPH)

Call body.BeginInsert(rtnav, True)

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( " -- " )

Call body.EndInsert


This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal