Laut KBASE sollte es eigentlich gefixt sein. Ich stelle mal die Artikel hier ein:
Product Area: Domino Designer, Notes Date: 16.07.2001
Product Release: Notes Client 4.6x, Notes Client 4.5x Document #: 147944
Category: Workstation/Desktop\\Application Development\\Macro/Agent/LotusScript
. This document is based on the following
Software Problem Report(s): About SPRs
SPR Number:
MBEN3AAS7D SPR Status:
Resolved/Fixed Fixed in:
Domino Designer 5.0, Notes Client 5.0
LotusScript Notes AppendRTItem Method Does not Preserve Font in New Document
Problem:
When you use AppendRTItem to copy a rich text item in Notes 4.5x/4.6x, the font name attribute of the item is lost.
For example, the code below copies an item successfully, keeping several text attributes (size and color), but it loses the font name.
Sub Click(Source As Button)
Dim session As New NotesSession
Dim workspace As New NOTESUIWORKSPACE
Dim db As NOTESDATABASE
Dim uidoc As NOTESUIDOCUMENT
Dim doc As NOTESDOCUMENT
Dim currentdoc As NOTESDOCUMENT
Dim view As NOTESVIEW
Dim memodoc As NOTESDOCUMENT
Dim memodoc2 As NOTESDOCUMENT
Dim item As Variant
Dim item2 As Variant
Dim richy As NOTESRICHTEXTITEM
Set db = session.CURRENTDATABASE
Set uidoc = workspace.CURRENTDOCUMENT
Set memodoc = New NOTESDOCUMENT(db)
Set memodoc2 = New NOTESDOCUMENT(db)
Set currentdoc = uidoc.DOCUMENT
memodoc.form = "Fax request"
memodoc.subject = uidoc.FIELDGETTEXT("subject")
memodoc2.form = "Fax request"
Set item2 = currentdoc.GETFIRSTITEM("FaxBody")
Set richy = New NOTESRICHTEXTITEM (Memodoc,"Body")
Call richy.AddNewLine (1)
Call richy.APPENDRTITEM(item2)
Call memodoc.save (True,True)
End Sub
Solution:
This issue was reported to Lotus Quality Engineering, and was addressed in Notes 5.0 Client and Domino 5.0 Designer.
Here is a workaround for this particular case. Before calling the AppendRTItem method, you must copy the $Fonts item from the source document to the destination document.
IMPORTANT NOTE: The scripts above and below are provided only to illustrate one way this issue can occur. Notes Support will not be able to customize these scripts for a customer's own configuration.
Sub Click(Source As Button)
Dim session As New NotesSession
Dim workspace As New NOTESUIWORKSPACE
Dim db As NOTESDATABASE
Dim uidoc As NOTESUIDOCUMENT
Dim doc As NOTESDOCUMENT
Dim currentdoc As NOTESDOCUMENT
Dim view As NOTESVIEW
Dim memodoc As NOTESDOCUMENT
Dim memodoc2 As NOTESDOCUMENT
Dim item As Variant
Dim item2 As Variant
Dim richy As NOTESRICHTEXTITEM
Set db = session.CURRENTDATABASE
Set uidoc = workspace.CURRENTDOCUMENT
Set memodoc = New NOTESDOCUMENT(db)
Set memodoc2 = New NOTESDOCUMENT(db)
Set currentdoc = uidoc.DOCUMENT
memodoc.form = "Fax request"
memodoc.subject = uidoc.FIELDGETTEXT("subject")
memodoc2.form = "Fax request"
Set item2 = currentdoc.GETFIRSTITEM("FaxBody")
Set richy = Memodoc.CREATERICHTEXTITEM("Body")
%REM
'Here we copy the font information located in the $fonts item
%END REM
Set font = currentdoc.GETFIRSTITEM("$Fonts")
Call font.CopyItemToDocument( memodoc, "" )
Call richy.AddNewLine (1)
Call richy.APPENDRTITEM(item2)
Call memodoc.save (True,True)
End Sub