rtLib — Notes Rich Text Management Library Documentation of rtLib — Notes Rich Text Management Library Download rtLib — Notes Rich Text Management Library FAQ of rtLib — Notes Rich Text Management Library Purchase rtLib — Notes Rich Text Management Library Feedback about rtLib — Notes Rich Text Management Library

setStyle


Start searchMail feedback

version 1.5

Function setStyle (newStyle, force As Variant) As Variant

setStyle method differs from Style property in:

1. it may take either style or any substyle as an argument.

2. it updates existing style or substyle, but does not add nonexisting styles. If table does not have TableLayout property set it can not be added using setStyle. Use Style.TableLayout instead.

It has a second parameter that may either be True/False - if True styles get updated for all the hierarchy below.

table.setStyle fontStyle, True

will set font according the rtFontstyle object passed as an argument. In case table contains nested tables or sections all textual content will set to this font style.

table.setStyle fontStyle, False

does nothing as table itself has no Font property.

3. Second parameter can also be the last object in hierarchy that will get this style applied -- "apply style until the object is the second parameter".

section.setStyle fontStyle, firstTableInSection

Section title and all section content up to the object "firstTableInSection" will have the particular font style. The content of firstTableInSection itself will not be set to this style as the last object this style is applied is the table itself.