Lotus Notes 6 - Copy Rich Text
285 pts.
0
Q:
Lotus Notes 6 - Copy Rich Text
I have created a function for our website which allows a user to create a news story. The news story is then viewed by users through a display page. From the display page users can also comment on the story. I've used a subform for this, and a WebQuerySave to add the comments.
The problem is that when the document is re-saved the field with the text (rich text computed) which normally saved the data like this: "MIME-Version: 1.0
Content-Transfer-Encoding: binary
Content-Type: text/html; charset=windows-1252

<P><BR>During an intense two-day orientation blitz..."

to just plain text (no mime)

Any suggestions on how to keep the formatting in the field?
In the WebQuerySave, I have tried doing this:
@SetField("text";text);
but no luck with that either...

Thanks
-mrg.
ASKED: Jul 30 2009  2:12 PM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0
285 pts.
0
A:
 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0
  • AddThis Social Bookmark Button
Last Answered: Jul 30 2009  2:12 PM GMT by Mrg   285 pts.
0
0
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Mrg   285 pts.  |   Aug 14 2009  3:10PM GMT

After doing a bit more reading in the help.. Does anyone know if I would need to write some lotusscript to take the existing ‘text’ field and either set it as read-only? Or should I copy it into another variable and then back again?

This is a modified version of what is in the help, (since I don’t completely understand it) but any other suggestions would be appreciated.

Sub Initialize
Dim s As New NotesSession
Dim db As NotesDatabase
Dim dc As NotesDocumentCollection
Dim doc As NotesDocument
Dim mime As NotesMIMEEntity
Dim m As String
Set db = s.CurrentDatabase
s.ConvertMIME = False ‘ Do not convert MIME to rich text
Set dc = db.UnprocessedDocuments
Set doc = dc.GetFirstDocument
While Not(doc Is Nothing)
Set mime = doc.GetMIMEEntity
If Not(mime Is Nothing) Then
m = “Content type:” & Chr(9) & _
mime.ContentType & Chr(13) & _
“Content subtype:” & Chr(9) & _
mime.ContentSubType & Chr(13) & _
“Character set:” & Chr(9) & _
mime.Charset & Chr(13) & _
“Encoding:” & Chr(9) & Chr(9) & _
mime.Encoding
Messagebox mime.ContentAsText,, “Content as text”
Else
Messagebox “Not MIME”,, doc.GetItemValue(”Subject”)(0)
End If
Set doc = dc.GetNextDocument(doc)
Wend
s.ConvertMIME = True ‘ Restore conversion
End Sub

 
0