Hi,
I am trying to copy a document to a RT field so that the user will be able to print the document and not loose any formatting.
However, when I call the new tempdoc, the RT field is actually empty. When I step through the Debugger it is seems like the content is actually copied. Any help appreciated…
Dim ws As New NotesUIWorkspace
Dim session As New NotesSession
Dim db As NotesDatabase
Dim uidoc As NotesUIDocument
Dim thisdoc As NotesDocument
'This sets the db to the current db
Set db = session.CurrentDatabase
'**This captures the current document
Set uidoc = ws.CurrentDocument
'**This takes it to the backend
Set thisdoc = uidoc.Document
Dim tempDoc As New NotesDocument(thisdoc.ParentDatabase)
Dim rtitem As New NotesRichTextItem(tempDoc, “Print”)
'** render the document to a rich text field
If thisdoc.RenderToRTItem(rtitem) Then
tempdoc.form=“Print”
Call tempDoc.Save(True, True)
'** To see result as test
Set uidoc = ws.EditDocument(True,tempdoc,True)