Hi:
If you are using RTF then you either:
1) need to use ODS control string \ul and \ul0 to turn underlining on and off for a word or text string (this method also needs for PROTECTSPECIALCHARS=OFF
or
2) if you are using SAS 9.2, use the TEXTDECORATION style attribute
The example below shows a few different ways to do underlining. The first example shows the text_decoration method and the second example shows the \ul method. Both methods show the use of the original ^S= syntax, which is what you should use for SAS 9.1.3. If you do have SAS 9.2, then there is alternate "function call" style syntax, that is described in this paper on page 2:
http://www2.sas.com/proceedings/sugi31/227-31.pdf
Note that, if you have SAS 9.1.3, then the Example 2 method is probably the one you would use. I used the underline in a few different places so you could see the method.
(Also, you cannot cut and paste directly from the pre-formatted posted code in the forum window into SAS -- you'd have to cut and paste the pre-formatted code from the forum window into some application, like Word, that respected the line feeds and carriage control characters and then cut and paste again from Word into your SAS Editor.)
cynthia
[pre]
** Example 1;
ods rtf file='c:\temp\rtf_under1.rtf' style=journal startpage=no;
ods escapechar='^';
ods rtf text = "^S={font_size=12pt font_face='Times Roman' font_weight=bold just=l textdecoration=underline} ODS Style Method";
proc tabulate data=sashelp.class;
title 'Example 1';
class sex /style={cellwidth=2in};
var age height weight;
table sex all='^S={textdecoration=underline}Average',
mean*(age height weight) /
box={label='Gender Report' s={textdecoration=underline just=l}};
run;
ods rtf text = "^S={textdecoration=underline font_face='Times New Roman' just=l} RTF Method";
ods rtf close;
** Example 2;
ods rtf file='c:\temp\rtf_under2.rtf' style=journal startpage=no;
ods escapechar='^';
ods rtf text = "^S={font_size=12pt font_face='Times Roman' font_weight=bold just=l protectspecialchars=off} \ul{ODS Style Method}\ul0";
proc tabulate data=sashelp.class;
title 'Example 2';
class sex /style={cellwidth=2in};
var age height weight;
table sex all="^S={protectspecialchars=off}\ul{Average}\ul0",
mean*(age height weight) /
box={style={protectspecialchars=off just=l} label='\ul{Gender Report}\ul0'};
run;
ods rtf text = "^S={protectspecialchars=off font_face='Times New Roman' just=l} \ul{RTF Method}\ul0";
ods rtf close;
[/pre]