Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem with RenderToRTItem

76 views
Skip to first unread message

Bryan.Sc...@walsworth.com

unread,
Dec 21, 2000, 6:24:34 PM12/21/00
to
I have been a Notes programmer for 2+ years and have never seen
anything like this....

I have an action in a form that should simply take the document, put it
into a mail document, set the SendTo field, and then let the user put
some text in the document.

I tried to use the Forward method, but I couldn't get the code in the
button to let me set the SendTo field. So I wrote the code below.

If I run it in debug and step through the code, it works. If I just let
it run (either in Debug or out) the mail memo doesn't contain the
document.

This is a real pain in the ass. What the hell am I doing wrong?


Set workspace = New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim maildb As NotesDatabase
Dim mailnote As NotesDocument
Dim doc As NotesDocument
Dim rtitem As NotesRichTextItem
Dim success As Variant

Set uidoc = workspace.CurrentDocument
Set doc = uidoc.document

Set maildb = New NotesDatabase("","")
maildb.OpenMail
Set mailnote = New NotesDocument(maildb)
mailnote.body = doc.body(0)

Set rtitem = New NotesRichTextItem( mailnote, "Body" )
success = doc.RenderToRTItem( rtitem )
mailnote.SendTo = "Bryan Schmiedeler/Walsworth Publishing
Company"

Call workspace.EditDocument(True,mailnote)


Sent via Deja.com
http://www.deja.com/

Jörg Schlusemann

unread,
Dec 22, 2000, 2:54:54 AM12/22/00
to
is there a default form in the database?
If not, RenderToRichtextItem will not work.

(It's not important, which form is the default form)

<Bryan.Sc...@Walsworth.Com> schrieb im Newsbeitrag
news:91u3fc$169$1...@nnrp1.deja.com...

Philippe Lauwers

unread,
Dec 22, 2000, 3:03:21 AM12/22/00
to Bryan.Sc...@walsworth.com
I've had another problem with this method : when running the code
erverything seemed to be fine but when opening documents that contained
RTItems created with RenderToRTItem, I got an application error. When
checking the document-properties all seemed to be fine, but if I managed to
open a document the contents of the richtextitem was spread all over the
document. Most of the times I got an application error.

I've also read that, when using RenderToRTItem non-activated
hide-when-formulas are executed for objects that are placed in a
layout-region.

To me it seems that they havn't done such a great job when programming this
method ...

If I would have to program somthing that requires use of this method these
days, I simply would state that it's impossible. Too much hastle, too much
frustration.

Philippe

Bryan.Sc...@walsworth.com

unread,
Dec 22, 2000, 11:11:45 AM12/22/00
to
There was not a default form. I designated a form as default, but this
did not change the observed behavour.

Is there a way to do this using the .Forward method?

In article <91v18i$5jgdj$1...@ID-29934.news.dfncis.de>,

0 new messages