This forum is closed to new posts and responses. New discussions are now taking place in the IBM Developer Answers forum.


Jan 29, 2015, 8:48 AM
25 Posts
topic has been resolvedResolved

Get Information out of Richtext Field via LotusScript

  • Category: Domino Designer
  • Platform: Windows
  • Release: 9.0.1
  • Role: Developer
  • Tags:
  • Replies: 2

Hi !

I´ve a button in the email document to put in the signature out of the calendarprofle document.
It works, but I only get the text without the formatting (color, font ...).
I had to take the field as a RichtextField , but I don´t know, how to do it, because my ls knowledge is not so good.

Here´s the code, maybe somebody has an idea !

Thanks.

 

Sub Click(Source As Button)
    
    Dim s As New notessession
    Dim profiledoc As NotesDocument
    Dim db As notesdatabase
    Dim signature As String
    Dim uidoc As NotesUIDocument
    Dim workspace As New NotesUIWorkspace  
    
    ' Get signature from profiledocument
    Set db = s.currentdatabase
    Set profileDoc = db.GetProfileDocument("CalendarProfile")
    signature = profileDoc.Signature_1
    
    
    ' Put into email
     Set uidoc = workspace.CurrentDocument
    Call uidoc.GotoField( "Body" )
    Call uidoc.FieldAppendText ( "Body", signature )
    
End Sub

Jan 29, 2015, 3:07 PM
82 Posts
Some things to look at
uidoc.appendtext is plain text only (uidoc being the front end ui doc).  Get a handle to the backend doc (uidoc.document), and use the the RichText... classes to add style

NotesRichTextItem
NotesRichTextStyle

Jan 30, 2015, 4:32 AM
25 Posts
thanks for information ... got it :-)

 


This forum is closed to new posts and responses. New discussions are now taking place in the IBM Developer Answers forum.