Question

  Asked: Feb 4 2008   7:58 PM GMT
  Asked by: Striving


LotusScript


LotusScript, Web application development, NotesRichTextItem, Body of e-mail

I'm creating an agent that loops through 6 different calls that evenutally sends out e-mails. I'm using a field called rtBody which is described as a NotesRichTextItem. In order to build each e-mail I use AppendText. Each each has the previous e-mails wording and also it's wording attached to the e-mail. So the last e-mail sent is a combination of all the e-mails sent before it before the loop ends. How can I blank out rtBody before rebuilding it within each e-mail?

Subscribe to Alerts! Get questions and answers delivered to your Inbox.


E-mail me updates on this question



   SUBSCRIBE

hidden modal window

Answer Wiki (Improve, edit or add to this answer)


 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0



After each mail is sent, you can re-initialize the rich text field And the mail document using Delete to get rid of the existing object. Each entry into the loop should use New (or CreateXXX) to get a new object:

For i = 1 To 6
Set maildoc = db.CreateDocument
.
. 'Set subject, recipient fields
.
Set rtBody = New NotesRichTextItem(maidoc, "Body")
.
. 'append message text, doclinks, etc.
.
Call maildoc.Send(False)
Delete rtBody
Delete maildoc
Next
  • AddThis Social Bookmark Button

Browse more Questions and Answers on Lotus Domino and Development.

Looking for relevant Lotus Domino Whitepapers? Visit the SearchDomino.com Research Library.


Discuss This Answer


You must be logged-in to discuss a question. Log-in/Register

Brooklynegg  |   Feb 5 2008  2:30PM GMT

Have you tried remove, or removeItem in the notesdocument class?