BookmarkSubscribeRSS Feed
postcanonical
Calcite | Level 5
I was trying to create a SAS rtf style template with margins 0.2in on each side. I've found out, that I can't set margin less then 0.25in, if I set 0.3in – it will work, but 0.2in will result in 0.25in margin, checked with Word.

Can't SAS calculate margins less then 0.25in? Or am doing something wrong?

``` sas
proc template;
define style styles.test;
parent=styles.rtf;
style body from document /
leftmargin=0.2in
rightmargin=0.2in
topmargin=0.2in
bottommargin=0.2in;
end;
run;
```

Try it yourself, and share your results, please.
4 REPLIES 4
Kathryn_SAS
SAS Employee

The following SAS Note explains how printer setup can influence margin settings:

https:https://support.sas.com/kb/36/590.html//support.sas.com/kb/36/590.html 

postcanonical
Calcite | Level 5
Thank you for a quick response!

I've created environment with:
-uprint
-uprintmenuswitch

I no longer see NOUNIVERSALPRINT in output of
proc options group=odsprint;
run;

But still my margins can't go less then 0.2jn, maybe I need to set some option like printer=? in "options" statement?
postcanonical
Calcite | Level 5
*less then 0.25in
Tom
Super User Tom
Super User

What printer are you asking WORD to print the RTF file on?

Can you provide an complete working program that demonstrates the issue?  All you provided was code to create a STYLE using PROC TEMPLATE.  Can you provide code that then uses that style to print something to an RTF file.

 

There are a couple of other ways to make files that WORD understands.

https://blogs.sas.com/content/sgf/2022/06/10/ods-destinations-microsoft-word/

Do those have the same problems with margins?

 

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 4 replies
  • 700 views
  • 1 like
  • 3 in conversation