Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 308
  • Last Modified:

Changing Paragraph Style in R6

Is it possible to change paragraph style using the new R6 Rich Text LotusScript classes? I am trying to programmatically change the alignment of rich text fields from "left" to "center", and it seems that this is not possible, although it is very easy to change text style (font size, etc). Your help will be greatly appreciated.

  • 2
1 Solution
ZvonkoSystems architectCommented:
Here an example for ALIGN_CENTER:

Dim session As New NotesSession
Dim db As NotesDatabase
Set db = session.Currentdatabase
Dim doc As New NotesDocument(db)
Call doc.AppendItemValue("From", session.Username)
Call doc.AppendItemValue("subject", _
"Meeting agenda")
Dim rtpStyle As NotesrichTextParagraphStyle
Set rtpStyle = session.CreateRichTextParagraphStyle
Dim richText As New NotesRichTextItem(doc, "Body")
rtpStyle.Alignment = ALIGN_CENTER
Call richText.AppendParagraphStyle(rtpStyle)
Call richText.AppendText("Where are we now")
Call richText.AppendText (" and where do we go from here.")
Messagebox rtpStyle.Alignment
Call doc.Save(True, False)

cyberzorkAuthor Commented:
Well, I had already seen that in the documentation. However, I need to *change* paragraph style in existing rich text fields, not to create a new one. As a matter of fact, the above example would even work under R5.
cyberzorkAuthor Commented:
I read on Notes.net that this is not possible. Thanks anyway.

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now