
OpenNTF Code Bin
About This Code
Brief Description:
Insert RichText into RichText with LotusScript
Contributor:
Ulrich Krause
Notes Version:
R6.x, R7.x
Last Modified:
21 Oct 2006
OpenNTF Disclaimer
All of the program code and information presented in the OpenNTF.org Code Bin are provided "as-is", and should be used at your own risk. OpenNTF.org make no express or implied warranty about anything in the Code Bin, and OpenNTF.org will not be responsible or liable for any damage caused by the use or misuse of anything from this site. OpenNTF.org makes no guarantees about anything. Please thoroughly test all of the knowledge and code you find here before you attempt to use them in your production environment.
Code / Description
Functionallity to insert a richtext item from one document into a richtext item of another document at a defined position.
For more information, see http://www.eknori.de/archives/348
Usage / Example
Sub Click(Source As Button)
Dim s As New NotesSession
Dim db As NotesDatabase
Dim col As NotesDocumentCollection
Dim doc As NotesDocument
Dim SourceDoc As NotesDocument ‘ contains the richtext to be inserted
Dim TargetDoc As NotesDocument ‘ insert RT here
Dim rtItem As NotesRichTextItem
Dim retval As Integer
Set db = s.GetDatabase( DB_SERVER, DB_FILE)
Set col = db.AllDocuments
Set SourceDoc = col.GetNthDocument(2) ‘ SecondDocument
Set TargetDoc = col.GetNthDocument(1) ‘ FirstDocument
Dim SourceNOTEID As Long
Dim TargetNOTEID As Long
‘ Convert NOTEID from HEX to Long
TargetNOTEID = Val(“&H” + TargetDoc.NoteID)
SourceNOTEID = Val(“&H” + SourceDoc.NoteID)
Msgbox InsertRichTextItem ( DB_SERVER, DB_FILE, SourceNOTEID, “Body”, TargetNOTEID, “Body”,“<RT>”)
End Sub
Comments
No documents found