Autoreply and Body

HiI use this script when a do a autoreply. The problem is that the content in the bodyfield don´t work. It´s empty when it come back. What have a done wrong.

Sub Initialize

Dim session As New NotesSession

Dim db As NotesDatabase

Dim doc As NotesDocument

Dim Item As NotesItem

Dim Item2 As NotesItem

Dim Item3 As NotesItem

Dim maildoc As NotesDocument

Dim upperBound As Integer

Dim buildsubject As String

Dim SearchView As NotesView

Dim activeDoc As NotesDocument

Dim rtitem As NotesRichTextItem

Dim docColl As NotesDocumentCollection



'Set email distribution list

Print "Starting AutoreplyMessage Agent"

Set db = session.CurrentDatabase

Set doc = session.DocumentContext

Set maildoc = New NotesDocument( db )

Set profileDoc = db.GetProfileDocument("KeyWords")



'Set the To, Subject and Body fields

maildoc.Form="Memo" 

maildoc.SendTo=profileDoc.ServerMail(0)

sender=profileDoc.ServerMail2(0)+profileDoc.DomainMail(0)

maildoc.from=sender

maildoc.SMTPOriginator=sender

maildoc.Principal=sender



'Format the document	

buildsubject = doc.Subject(0)

maildoc.Subject = buildsubject

'BODY

Set rtitem = New NotesRichTextItem(doc,"Body") 

Call rtitem.appendtext(Body)



Call maildoc.Send(False)

End Sub

Kind regards

Fredrik

Subject: Autoreply and Body

This line does notlook right to me:

Call rtitem.appendtext(Body)

What is Body?

Please add Option Explicit/Option Declare in your script; this will gard you against these type of errors.