The easiest way would be to put your style attributes and values in an object (or arrays) and then loop over them calling ST SET ATTRIBUTES. For example, here is what I use to clear all font styles:
ARRAY LONGINT($aStyle;0) ARRAY_Append_integer (->$aStyle;Attribute bold style;Attribute italic style;Attribute strikethrough style;Attribute underline style) For ($iStyle;1;Size of array($aStyle)) ST SET ATTRIBUTES(*;$objectName;ST Start highlight;ST End highlight;$aStyle{$iStyle};0) End for Note one issue that I ran into was that I had to use object name form in order to use the selection constants. John DeSoi, Ph.D. > On Sep 21, 2017, at 10:05 AM, Pat Bensky via 4D_Tech <4d_tech@lists.4d.com> > wrote: > > *ST SET ATTRIBUTES*(oWPdoc;$offset;iwpOffset;atStyles{1}) > > How would the styles be built? I've tried things like > > $style:="5;"+Char(34)+"Arial"+Char(34)+";6;14" ********************************************************************** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: http://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **********************************************************************