Interesting (or not) Store contents as HTML and MIME

This is wierd. I have a RTF stored as HTML and MIME because I want to pull the html out of the field and use it to post to a web page. I am creating a Notes document, which on the post save event, creates a new document (formatted with passthru html) and inserts the html contents of the RTF in a field on the new document, thereby completing the HTML code.

Seems to work fine, EXCEPT when the RTF does not have any special formatting in it, just plain text. Notes doesn’t convert it to html, so the MIME_PART doesn’t exist…

Is there a way to force notes to generate HTML for the field, even if it doesn’t have to?

my lovely code:

Dim session As New NotesSession

Dim ws As New NotesUIWorkspace

Dim db As NotesDatabase

Dim doc As NotesDocument

Dim thisdoc As NotesDocument

Dim uidoc As NotesUIDocument

Dim mime As NotesMimeEntity	



Set db = session.CurrentDatabase

Set uidoc = ws.CurrentDocument

Set thisdoc = uidoc.Document

Set doc = New NotesDocument(db)

Set mime = thisdoc.GetMIMEEntity("conBody")



doc.Form = "htmlProduct"

doc.ImageResource=uidoc.FieldGetText("conImgRes")

doc.ImageHeight = uidoc.FieldGetText("conImgHeight")

doc.ImageWidth = uidoc.FieldGetText("conImgWidth")

doc.Title = uidoc.FieldGetText("conTitle")

doc.htmlBody = mime.ContentAsText

Call doc.MakeResponse( thisdoc )

Call doc.Save(True,True)

thanks

Subject: Interesting (or not) Store contents as HTML and MIME

I suppose that after executing this line:

Set mime = thisdoc.GetMIMEEntity(“conBody”)

you find that mime is Nothing, you can always grab the abstract of the text found in the RTF and wrap in with

tags (or something like that)

Subject: RE: Interesting (or not) Store contents as HTML and MIME

yes, thats true… good idea!

Thanks!