1
824HNQ
  Forum Home :

UIDocument won't close
Your Email Addresstom.doughty@cox.net
Your NameTom Doughty
Company NameAnonymous
Subject UIDocument won't close
Details
I am testing a technique to make rich text data immediately visible to the client and am experiencing a problem where a uidoc window will not close. The code functions correctly until I hit around 5000 lines of output.

Sample code is listed below and assumes that the code is executed from a button or action on a form and the form contains a rich text field named "body". The constant MAXLINES is used to control the number of lines of output. When MAXLINES is increased to around 5000, the original uidoc window remains opened.




Sub Click(Source As Button)
'--- Number of lines of output written to the Rich Text field
Const MAXLINES = 50
Dim uiws As New NotesUIWorkspace
Dim doc As NotesDocument
Dim uidoc As NotesUIDocument
Dim uidocNew As NotesUIDocument
Dim rtitem As NotesRichTextItem
Dim rtrange As NotesRichTextRange
Dim i As Integer

Set uidoc = uiws.CurrentDocument
Set doc = uidoc.Document

Call uidoc.Refresh(True)

Set rtitem = doc.GetFirstItem("Body")
Set rtrange = rtitem.CreateRange
Call rtrange.Remove

For i = 1 To MAXLINES
Call rtitem.AppendText( Format(i,"0#. ") + "This is a line of test output")
Call rtitem.AddNewline(2)
Next

rtitem.Update

doc.SaveOptions = "0"
Call uidoc.Close(True)

Set uidocNew = uiws.EditDocument(True,doc, , , , True)

Delete uidoc
uidocNew.Document.RemoveItem("SaveOptions")
End Sub


Add Response   ||  New Main Topic   ||  View Entire Thread
Responses to "UIDocument won't close":

 Latest Tips & Tricks
10/07/2009Terminal Services Tips & Tricks - How to kill terminal server sessions. Utilities for terminal services: qwinsta and rwinsta(Steven Charles Robinson)
10/07/2009.NET Tips & Tricks - The type or namespace name could not be found (are you missing a using directive or an assembly reference?)(SCRobinson)
10/07/2009Terminate Lotus Notes Processes, Error Tips & Tricks - Lotus Notes: An Error Was Encountered While Opening A Window(Steven Charles Robinson)
26/04/2007LotusScript Mail, SMTP, Spam, Junkmail Tips & Tricks - How to drag and drop spam into junk mail filter using LotusScript(Steven Charles Robinson)
31/10/2006Terminate Lotus Notes Processes, Error Tips & Tricks - Lotus Notes: An Error Was Encountered While Opening A Window(Steven Charles Robinson)
23/10/2006Errors, SMTP, Internet Sites, Configuration, Administration, Domino 7 Tips & Tricks - Domino authentication is not enabled in the smtp internet site document(Steven Charles Robinson)
20/10/2006Articles Tips & Tricks - Have you see our recent arcticle in "The View": Proven techniques for abstracting UI from data using XML, XSL and Domino.(Steven Charles Robinson)
26/09/2006.NET Tips & Tricks - If your looking for .NET tips visit http://www.codedotnet.net(S C Robinson)
25/09/2006Using Lotus Notes Tips & Tricks - Save the Window state of a Lotus Notes client on shutdown.(Steven Charles Robinson)
22/09/2006NET, Culture, Globalization Tips & Tricks - How to find out the current culture in a .NET application.(Steve C Robinson)
© 2003 notes411.com. All rights reserved. Disclaimer. site designed & developed by appsworks.com
Lotus Notes is a registered trademark of IBM. This site is not affiliated with IBM or Lotus.
 News

 Google Box
 Sponsor
ClearCase, Subversion, WebSphere Consulting
 Best in the Industry
Lotus Notes & Domino FAQ