Lawrence:
I'm not sure what you mean by "template Word table" -- the word "template" in SAS jargon can be used for several different things, AND the word "template" for Word generally means a .dot file. However, I assume you want to know what elements in the SAS style template control the different table components. (Warning -- long post!)
Tables themselves are pretty simple. The column headers are controlled by the HEADER style element; the data cells by the DATA style element (or sometimes by the CELL style element) and the TABLE itself (interior table lines, borders etc) is controlled by the TABLE element (or sometimes by the OUTPUT element). The background that the table is sitting on is generally controlled by the BODY element.
But then if your table has -titles- or -footnotes- or by lines then more style elements are involved. There are a couple of ways to figure out what style elements are involved in your table. Let me start with the easiest.
I know you're interested in Word, but first, make an HTML copy of your table (assumes SAS 9)
[pre]
ods html file='diagnose.html';
proc whatever data=yourdata;
run;
ods html close;
[/pre]
inside the ODS HTML sandwich, put your procedure of choice. Then, when you are looking at the HTML file in the browser, right click on the HTML page and select View-->Source. This should open a Notepad window where you will see the HTML source code. Use the FIND commmand to find the CLASS= attribute in the HTML tags. Zero in on some piece of output that you want to change (like a column header or something). Look for that string and then note the CLASS= attribute used for that string. Now go to the style template and look for that style element. --That's the element you want to change in your modification of the style template.-- Ignore the CLASS= attributes that are 'l', 'r', or 'c' -- those are just alignment classes for left, right or center. Focus instead on the whole word class selectors (like Header, Table, SystemTitle, etc).
If you are running SAS 8, you will not find a CLASS= attribute in your HTML unless you modify your invocation to have the stylesheet option:
ods html file='diag8.html'
stylesheet;
I know it seems weird, but it doesn't matter WHAT the destination is (HTML, RTF or PDF) -- a table is a table is a table....a header is a header is a header. The only difference between HTML and RTF is that HTML reveals its inner workings with CLASS= way better than RTF (or PDF) does. So you're just using HTML to diagnose the style elements that you will change for your RTF style template.
Next method ... this one builds on the first one. The brilliant developers at SAS have created a "diagnostic tagset" that allows you to bypass opening the HTML source code and looking for the CLASS= attribute. So, to use the diagnostic tagset, you'd do this (works in SAS 8.2 or 9):
[pre]
ods listing close;
ods markup file='diag_popup.html'
type=style_popup
stylesheet='diag.css';
proc whatever=yourdata;
run;
ods markup close;
ods listing;
[/pre]
You're still creating an HTML file, but now, if you have popups enabled in your browser, when you float your mouse over a piece of your table, the style element that controls that table component will "pop up" in a flyover window and even better, if you double click on a table component, then a second window will "pop up" that has ALL the style attribute settings currently in place for that particular element.
It's sort of hard to explain the popping up in plain text, but is really cool to watch. BTW, if you are using SAS 8.2, you may have to download an updated copy of the tagset code to your machine and create the template prior to running the above code.
Arghhh! you've read all the way down to here and you still haven't changed your style template yet! But NOW you know which style elements to really look at when you do start to tackle the style template and the PROC TEMPLATE syntax (which is being made easier for SAS 9.2). Also, you'll probably get into issues of style element inheritance once you get into PROC TEMPLATE and if you go to the SAS documentation and search for the string "Style Elements and Their Inheritances", you will find a useful table that talks about style elements and, if inheritance is involved, what element in the parent element. This table also lists the destinations in which a particular element is "respected" or supported.
SAS Education has a class on modifying both TABLE and STYLE templates. It is described here:
http://www.sas.com/apps/wtraining2/coursedetails.jsp?course_code=odsadv9&ctry=us
Meanwhile, there are many, most excellent, examples of changing a style template here at the Tech Support FAQ site:
http://support.sas.com/rnd/base/topics/templateFAQ/Template.html (start here and then look for the specific PROC TEMPLATE or STYLE template links)
My advice is to start slowly -- try to change one element in your style template and then move on to the next element. If you are interested in Word friendly styles...consider starting your style template explorations with Styles.RTF or Styles.Journal -- they currently produce that best Word friendly output (in my opinion).
BTW, Enterprise Guide has a very nice GUI style editor, that lets you visually select pieces of the table and alter the style. But I sense that you are not using EG because most EG folks don't ask about PROC TEMPLATE and EG is NOT changing a style template behind the scenes, but constructing a .CSS file for ODS to use.
Good luck!
cynthia