My ODS RTF continues to provide 0.05 instead of 0.5 margin widths. I have tried to change this through proc template and options with no success. The top and bottom margins work just fine and I can change them as needed.
Below is the template code (from p. 432 ODS Basics and Beyond)
Define style RTFmargins;
Parent = styles.rtf;
Style body from body/
bottommargin = .5in Topmargin=.5in leftmargin=.5in rightmargin=.5in;
Here is the code used to create the RTF. I am using WORD 2007 to open and edit the RTF.
I do not have SAS 9.1.3 or Office 2007 to test with anymore, but either of these 3 techniques works for me in SAS 9.2 with Office 2007:
Basic) Just use SAS Options -- in my code below, I use options with the JOURNAL style (using SAS Options directly with RTF did not work in SAS 8, for example, you had to make a template change)
1) change the template to have margin values and do NOT use the OPTIONS for margin
2) Explicitly _UNDEF_ the margin values in the template and DO use SAS OPTIONS for margin values in my code
All of these methods are shown below. All the code in our ODS book was tested in SAS 9.2 -- we did not go back and test code in SAS 9.1.3, but I believe that if these methods do not work in SAS 9.1.3, that at least the #1 and #2 method should work. Lauren wrote this paper for SAS 8.2 and early SAS 9 that outlined the #1 and #2 technique: http://www2.sas.com/proceedings/sugi29/125-29.pdf
Otherwise, if you run program #1 and #2 and neither of them result in the desired margins (you're still getting a margin of .05) then you may have a corrupted NORMAL.DOT file or some other problem with Microsoft Word.
In that case, you may want to work with Tech Support on this issue. (Note, in the code below, I made my margins 4 distinct values for #1 and #2, each time, so you could quickly see each margin's value in the Word Page Layout window.)
** Basic Method -- use ONLY options;
** make sure SAS options are not interfering and are set to;
** something DIFFERENT than I will put in the template;
options bottommargin = 1.0in
proc print data=sashelp.shoes(obs=200);
title '2) change margins in options with _undef_ in template';
title2 'check page layout to see "different" margin sizes';
var region product sales;
ods rtf close;