Richetext Value

Can any one help me …

how to insert richtext value from another document into an exiting richtext item using lotus script or javascript ?

Thanks…

Subject: Richetext Value

You need to get a handle to the rich text to append and then use the AppendRTItem method. Take a look at the example in the Designer help for that method.

Subject: Richetext Value

Hey there Ravi.Here is the LotusScript you need:

Dim itemTarget As Variant

Dim itemSource as Variant

’ intentional variants instead of NotesRichTextItem

Dim docSource As NotesDocument

Dim docTarget As NotesDocument

’ Your code to get a handle to your source and target documents

if docSource.HasItem(SOURCEITEMNAME) Then Set itemSource = docSource.GetFirstItem(SOURCEITEMNAME)

if docTarget.HasItem(TARGETITEMNAME) Then Set itemTarget = docTarget.GetFirstItem(TARGETITEMNAME)

’ throw an error and bail out if either item doesn’t exist

if ((itemSource Is Nothing) or (itemTarget Is Nothing)) Then Error YOURERROR_MISSINGITEM, YOURMESSAGE_MISSINGITEM

’ throw an error and bail out if either item is not RICHTEXT

if ((itemSource.Type <> RICHTEXT) or (itemTarget.Type <> RICHTEXT)) Then Error YOURERROR_NOTRICHTEXT, YOURMESSAGE_NOTRICHTEXT

Call itemTarget.AppendRTItem(itemSource)

’ make sure to save the document

Call docTarget.Save(your options here)

Hope this helps!

-Devin.

Subject: RE: Richetext Value

Thanks! Devin.

I will check it and I’ll get back to you.

Thanks Again…