BookmarkSubscribeRSS Feed
qkaiwei
Calcite | Level 5
When using "send to Microsoft word" in EG, by default, tables have no border lines in word. How to solve it.
3 REPLIES 3
Cynthia_sas
Diamond | Level 26
Hi:
Instead of using the "Send To --> Microsoft Word" choice, you might want to investigate using ODS RTF -- which creates a Rich Text format file that Word can open.

There are 2 ways to enable the creation of ODS RTF output.
1) Tools --> Options --> Results --> Results General (or a similar path) and uncheck HTML and/or SASReport as the formats for output and instead check the RTF destination. After this, all your results will be created in RTF format in a temporary location (but you can save or export them).

2) Use ODS RTF code similar to the following:
[pre]
ods _all_ close;

ods rtf file='c:\temp\myreport.rtf';

** your code;

ods rtf close;
[/pre]


And, if you are using the SAS Add-in for Microsoft Office, you could run your task from inside Word to have the result appear directly in Microsoft Word -- or run a stored process that returned report/analysis results directly to Word.
cynthia
S_Burggraaff
Calcite | Level 5

Yesterday I noticed that you can send border information from a SP to Word via the add-in, but that you have less control over the appearance of that border. If I run a proc report in EG that assigns red to the left border of a cell and green to the right border of the same cell, then the correct result is shown in the output window. If put that same code in a SP and run it via the add-in, the result will not have the different colors in Word. It usually shows it as a black box, even if the result format is set to HTML or RTF.

Why is that?

qkaiwei
Calcite | Level 5
Thank for your reply first. I'll keep tracking.

By the way, I don't think it's a better way that: Ok,that's not perfect enough, so try another way not perfect enough, everything is not perfect enough.

Hehe!

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1647 views
  • 0 likes
  • 3 in conversation