BookmarkSubscribeRSS Feed
Obsidian | Level 7

   After upgrading to 9.4, ODS MSoffice2k now adds a text frame/box around text when using it to include text in the body of an outlook email.  Is there an option to do turn this off?  I have tried FRAME= and BORDER= but those don't appear to control that feature.  I've attached an example of what I'm seeing.  Thanks!

Super User

ods tagsets.msoffice2k file='' options(doc='Help');

Should show the options available.

I don't see anything related to borders/cells etc. in the 9.3 version. Good luck.



ODS MSOFFICE2K is an HTML-type of destination. Why did you post the question in the SAS/GRAPH and ODS GRAPHICS forum. Are you creating and sending HTML files with SAS/GRAPH output or ODS GRAPHICS output in your Outlook mail? You indicated that MSOFFICE2K "includes text in the body of an outlook email" -- so I am confused. Is your text box the result of an ANNOTATE? Or the result of a TITLE statement? You did not indicate what style template or CSS file you used to create your output. You did not show your code, so it is hard to speculate and FRAME=/BORDER= might not be the right things to try, but it is only speculation, since you showed so little of your output and none of your code.

  The bottom line is that you might want to open a track with Tech Support if you can't show your more of your code and share some sample data to test with. When I run the attached code, I do NOT see a box or frame around the title. Without seeing your code or how you are creating your text, it is impossible to make a constructive suggestion.


ods msoffice2k file='c:\temp\text.html';

title 'Please see the attached dashboard for more information';

proc print data=sashelp.class;


ods msoffice2k close;

Obsidian | Level 7

I posted it here because it uses an ODS tagset, where should MSOFFICE2K questions posted?

Code posted below.  In this example, there are two boxes being added, each of them around the ods msoffice2k text output (interestingly, the PROC REPORT code does not generate a box around the input)

option emailhost='localhost';

filename mymail email

  from = ""

  to  =  ""


  subject="Dashboard - Week Ending &end."

  attach = ("Dashboard - Week Ending &end..pdf")


ods MSOffice2K

body=mymail style=analysis;

ods escapechar="^";

ods msoffice2k text="Please see the attached dashboard for the week ending &end.. ^2n";

<PROC REPORT code here>

ods msoffice2k text="^2nPlease let me know if you have any questions.";

ods msoffice2k close;



If you are NOT using any SAS/GRAPH or ODS GRAPHICS code in your program, then the correct Forum would be the ODS and Base Reporting Forum 

  When I run some test code in SAS 9.4, I do not observe the border around the text box. This is probably a question for Tech Support. Or the border could have been added by the mail program rendering the HTML tags. What happens if you make the HTML file separately and send it as an attachment instead of in the body of the email???


%let end = 12/26/2014;


ods MSOffice2K body='c:\temp\testtext.html' style=analysis;

ods escapechar="^";

ods msoffice2k text="Please see the attached dashboard for the week ending &end.. ^2n";


proc report data=sashelp.class nowd;

title "my version of SAS &sysvlong";



ods msoffice2k text="^2nPlease let me know if you have any questions.";


ods msoffice2k close;

Obsidian | Level 7

Even without attaching a file, just using the text line, a border is created.  I noticed that a outline/box is standard for the analysis style, so I have been trying to create a custom style using proc template to remove all borders around a text box, but it still adds the borders in the email body.  I have reached out to tech support, thank you for your time.

Calcite | Level 5

How did you solve this issue?



Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Get the $99 certification deal.jpg



Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 4 in conversation