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

x
  • 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.

Thanks
0
cyberzork
Asked:
cyberzork
  • 2
1 Solution
 
ZvonkoSystems architectCommented:
Here an example for ALIGN_CENTER:
http://www-12.lotus.com/ldd/doc/domino_notes/Rnext/help6_designer.nsf/855dc7fcfd5fec9a85256b870069c0ab/e1c4942d8b7d970c85256c54004d44b2?OpenDocument

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)


0
 
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.
0
 
cyberzorkAuthor Commented:
I read on Notes.net that this is not possible. Thanks anyway.
0

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