Manage Learn to apply best practices and optimize your operations.

Setting the Document Property of NotesUIDocument Not Set With ComposeDocument Method

Lotus Notes Knowledge Base, Document# 140997, Dated 07/07/2000. Using the Document property of the NotesUIDocument class, a back-end document handle can be obtained from a front-end document. Subsequently, the properties and methods of this NotesDocument object can be used. If, however, the ComposeDocument method of the NotesUIWorkspace is used to create a new front-end document, the Document property of the NotesUIDocument cannot be set until the NotesUIDocument has been saved. Solution Given: This was reported to Lotus Quality Engineering, but it was determined that Notes is functioning as designed.

Until a save has been performed, the document (note) exists only in memory. It is not possible to set the Document property for document that exists only in memory.

You can get a handle on the document property of the newly composed document by declaring and setting the document in the postopen event of the form being composed.

(From the calling Agent)
Dim ws As New NotesUIWorkspace
Dim newDoc As notesdocument
Dim newUIdoc As notesuidocument
Set newUIdoc = ws.composeDocument("","","newDoc")
Set newDoc = newUIdoc.document  'This will get handle on document to allow manipulation  

(From the Postopen event in the "newDoc" form)
Sub Postopen(Source As Notesuidocument)
     Dim doc As NotesDocument   
     Set doc = Source.Document
End Sub

Dig Deeper on Domino Resources - Part 4

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...