.
HCLSoftware Business Partner
Domino Consulting Services
CRUCIAL Notes Tools
+1
212-599-2048
Domino Consulting Services
CRUCIAL Notes Tools
Domino administration
Notes development
Chat now
.
EN - English
CN - 中文
JP - 日本語
DE - Deutsch
FR - Français
BR - Português
RU - Pу́сский
IT - Italiano
IN - हिन्दी
ES - Español
KR - 한국어
ID - Indonesia
NL - Dutch
TR - Türkçe
SA - العربية
SE - Svenska
NO - Norsk
PL - Polski
TH - ไทย
DK - Dansk
MY - Malay
PH - Filipino
GR - Ελληνικά
FI - Suomi
IL - עברית
IE - Gaeilge
CZ - Čeština
UA - Українська
RO - Română
VN - Tiếng Việt
BD - বাংলা
HU - Magyar
Need a Domino Consultant? Call NotesMail +1 212-599-2048
-
HCLSoftware Business Partner
LOTUSSCRIPT/COM/OLE CLASSES
Examples: AppendRTItem method
1. This script takes the Body item on document B and appends it to the end of the Body item on document A. The Body item on document B is deleted using the Remove method defined in NotesItem.
Dim docA As NotesDocument
Dim docB As NotesDocument
Dim rtitemA As Variant
Dim rtitemB As Variant
'...set values of docA and docB...
Set rtitemA = docA.GetFirstItem( "Body" )
Set rtitemB = docB.GetFirstItem( "Body" )
If ( rtitemA.Type = RICHTEXT And _
rtitemB.Type = RICHTEXT ) Then
Call rtitemA.AppendRTItem( rtitemB )
Call rtitemB.Remove
Call docA.Save( False, True )
Call docB.Save( False, True )
End If
2. This script shows you how to append one RTItem to another without a prompt to save the document. This example illustrates the use of a back-end class in the UI.
Sub Click(Source As Button)
Dim w As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim docA As NotesDocument
Dim rtitemA As Variant
Dim rtitemB As Variant
Set uidoc = w.CurrentDocument
Set docA = uidoc.Document
Call uidoc.Save
Set rtitemA = docA.GetFirstItem( "Body" )
Set rtitemB = docA.GetFirstItem( "Body1" )
If ( rtitemA.Type = RICHTEXT And _
rtitemB.Type = RICHTEXT ) Then
Call rtitemA.AddNewLine(1)
Call rtitemA.AppendRTItem( rtitemB )
docA.body1 = " "
docA.SaveOptions = "0"
Call docA.Save(False, True)
Call uidoc.Close
End IF
End Sub
Note
The changes are not visible until the document (after the script has completed) is closed and reopened. Also note that the AppendRichTextItem method appends only the first 32K of a RichTextItem; the remainder is truncated.
See Also
AppendRTItem method
Feedback on
Help
or
Product Usability
?
Help on Help
All Help Contents
Feedback on
Help
or
Usability
?
Help on Help
All Help Contents