This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal


Jan 29, 2015, 1:48 PM
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, 8: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


This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal