• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 171
  • Last Modified:

Open a written document from a navigator-button

i'm working with Notes 4.6.2a "developer-version" and WinNT 4.0. One of my forms contains only one rtf-field. The field-content should be variable but unique. The user now click on the navigator-button and immediately the form shall opens with the old textinput - i don't want an empty form. Is it possible? Please give me a code-example.
Many greetings and thanks a lot!
Ingo Schmökel
1 Solution

If u are trying to create a form with default value in RT field then I don't think that is feasible...because Notes realizes the changes made to RT field only after saving and reloading the document...

Challenging !

Anyway Good Luck

May be you can create a backend document with the values you want in the RTField and then use the script to open that document which would contain the text that you want to have.

Good Luck !!!

I agree with Arunkumar's suggestion above -- your "new message" action can create a new NotesDocument item in the current database with LotusScript, use AppendRTItem to populate the rich text field, then open it for editing in the uidoc.  Something like this:

Sub Click (Source As Button)
dim ws as new notesuiworkspace
dim sess as new notessession
dim db as notesdatabase
dim getdoc as notesdocument
dim doc as notesdocument
dim uidoc as notesuidocument

set db = sess.currentdatabase
set doc = New notesdocument(db)

' -- get a handle to `getdoc` here...
' -- you didn't suggest a method so i'll
' -- assume it's from a db profile doc
set getdoc = db.getprofiledocument( "*** profile form name ***" )

doc.Form = " **form to use** "
dim thertf as new notesrichtextitem(doc, " *** name of field *** ")
dim getrtf as notesrichtextitem
set getrtf = getdoc.getfirstitem( "Name of field to grab" )
call doc.AppendRTItem( getrtf )
call doc.save( True, False )
set uidoc = ws.editdocument( True, doc )

End Sub

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now