Hi,
I have a stored form that contains a rich-text field named GCC. We want to load HTML code using LotusScript into this field and then send (mail) the form to a few recipients. The problem is we couldn’t get the brackets or the passthru flag to work but we have been successful in creating a mime entity named GCC (instead of the default body) which will render the HTML. When we save it everything looks fine… but when we send it we get the following error:
Illegal use of non-Body MIME_PART(s) 4536 on line # (# = to the line for maildoc.send(true) below)
I tried to search the forum for this error and couldn’t get a hit.
If I change the field name on the form to “Body” and use the default MIME code everything is fine. Eventually we want to have more than one field so we need to create our own field (mime) entities. If I open the document in the view and press “Forward”… it will work as well but we need to automate the sending of this email.
I thought maybe adding a “Body” and populating it would get around the error but no luck. I also even removed the stored form and changed it to send(False)… same error.
Here is the code to populate the stored form:
<<>>>
Dim s As New notessession
Dim db As NotesDatabase
Dim maildoc As notesdocument
Set db = s.currentdatabase
Set uname = New notesname(s.username)
Dim gccstream As NotesStream
Set gccstream = s.CreateStream
Dim gcc As NotesMIMEEntity
s.ConvertMIME = False
Set maildoc = db.createdocument
With maildoc
.Form = “frmTable”
.SendTo = uname.canonical
.Subject = “Table Test”
Call gccstream.WriteText(“GCC Test”)
Set gcc = .CreateMIMEEntity(“gcc”)
Call gcc.SetContentFromText (gccstream, “text/html;charset=iso-8859-1”, ENC_NONE)
Call .save(True, False)
Call .send(True) 'this line causes the error
End With
s.ConvertMIME = True
<<>>
Thanks for any help…
Brent