Das Notes Forum

Domino 9 und frühere Versionen => Entwicklung => Thema gestartet von: nieke am 07.07.03 - 16:05:09

Titel: Dokument in ein Richtextfeld eines anderen Docs einfügen
Beitrag von: nieke am 07.07.03 - 16:05:09
... ich habe folgendes Problem:
Ich habe ein Dokument, welches ich komplett kopieren und in ein Richtextfeld eines zweiten Dokumentes kopieren will.
Ich mache ich das?
Die Dokumente habe ich jeweils am Wickel.
Kopieren könnte ich ja notfalls auch noch, aber einfügen in ein Richtextfeld... da hört es dann auf.
Habt Ihr eine Idee?
Titel: Re:Dokument in ein Richtextfeld eines anderen Docs einfügen
Beitrag von: Glombi am 07.07.03 - 16:08:32
Hi,
dazu gibt es die Script-Methode RenderToRTItem

Example: RenderToRTItem method  

This script creates a picture of document A and places it into the Body item of the newly-created document B.
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim docA As NotesDocument
Dim docB As NotesDocument
Dim rtitem As NotesRichTextItem
Dim success As Variant
Set db = session.CurrentDatabase
'...set value of docA...
Set docB = New NotesDocument( db )
Set rtitem = New NotesRichTextItem( docB, "Body" )
docB.Form = "Main Topic"
docB.Subject = "It's a picture of the document"
Call docB.Save( True, True )
success = docA.RenderToRTItem( rtitem )
Call docB.Save( True, True )


Andreas
Titel: Re:Dokument in ein Richtextfeld eines anderen Docs einfügen
Beitrag von: nieke am 07.07.03 - 16:31:52
... hat funktioniert!
Ich habe das Dokument jetzt in das Feld kopieren können.
DANKE!