I want to move a attachment from a richtext field to another Tf field(Light).How can this be done?
regards
I want to move a attachment from a richtext field to another Tf field(Light).How can this be done?
regards
Subject: Moving a attachment
How’s your LotusScript ? ![]()
The way that I have achieved it pretty consistently in the past is by copying the item containing the Attachment like this (please bear in mind that this will only work in the ‘Back End’ - if you have the target doc open in the UI it doesn’t work…)
'Create a new RichTextItem field and then Save…
Dim newRichTextItem As New NotesRichTextItem( targetDoc, “FieldToHoldAttachment” )
Call targetDoc(True, False)
'Now RT as a Variant and try to append to the existing field.
Dim SourceRichTextItem As Variant
Set SourceRichTextItem = sourceDoc.GetFirstItem(“FieldCurrentlyHoldingAttachment”)
Call newRichTextItem.AppendRTItem( SourceRichTextItem )
Call targetDoc.Save(True, False)
Works for me. Best of luck,
Tom.
Subject: My lotusScript is beyond zero
I’ve to learn! Tanks for the suggestion