I work for an organization that conducts clinical trial research, and our organization has a standardized powerpoint template for the reporting of all of our results. I've been tasked with coming up with programming to take advantage of the ODS PowerPoint destination to streamline generation of slides with tables of statistics. I'm having trouble figuring out how to change the color of fonts to match the odd colors that our graphics department has chosen for the slide template. I can't find any sample programming showing exactly how to change the font colors. The closest I've gotten is Tim Hunter's 2013 SAS Global Forum paper (https://support.sas.com/resources/papers/proceedings13/041-2013.pdf) that mentions but doesn't demonstrate how to make this particular change.
Below is what I think should work. The colors all match up with the colors in my organizations template. But what I get is a slide that is entirely black. The background is black, all the text is black...everything is black. Can someone show me where I've gone wrong?
I am using 64 bit Windows 7, SAS 9.4, TS Level 1M2, and have Office 2010.
Thanks!
ods path work.templat(update) sasuser.templat(update) sashelp.tmplmst(read);
ods path (prepend) work.templat(update);
proc template;
define style ppt;
parent=styles.powerpointlight;
scheme 'ODS Light' /
dark1 = #cx565656
light1 = #cxffffff
dark2 = #cx565656
light2 = #cxffffff
accent1 = #cx98012E
accent2 = #cx565656
accent3 = #cxffffff
accent4 = #cxffffff
accent5 = #cxffffff
accent6 = #cxffffff
heading_font = ("Arial",32pt)
body_font = ("Arial",20pt);
end;
run;
ods powerpoint style=ppt;
title "Children 14+";
proc report data = sashelp.class nowd;
columns Name sex age height weight;
where age ge 14;
run;
ods powerpoint close;
You're almost there. The color names should start with cx, not #cx.
scheme 'ODS Light' / dark1 = cx565656 light1 = cxffffff dark2 = cx565656 light2 = cxffffff accent1 = cx98012E accent2 = cx565656 accent3 = cxffffff accent4 = cxffffff accent5 = cxffffff accent6 = cxffffff heading_font = ("Arial",32pt) body_font = ("Arial",20pt);
This is an implementation that is in Stephen Fews style. It should give you the idea of how to customize your own template.
https://gist.github.com/statgeek/9845cc3d26e4c35e01a2
Thanks for the link, but I'm already familiar with customizing templates for use in RTF & PDF destination output. It's the Powerpoint destination-specific parts of the template that don't seem to be working, particularly with respect to the color. The changes I've attempted to both the font & font size are working...it's the color that's being difficult. Thanks anyway!
You're almost there. The color names should start with cx, not #cx.
scheme 'ODS Light' / dark1 = cx565656 light1 = cxffffff dark2 = cx565656 light2 = cxffffff accent1 = cx98012E accent2 = cx565656 accent3 = cxffffff accent4 = cxffffff accent5 = cxffffff accent6 = cxffffff heading_font = ("Arial",32pt) body_font = ("Arial",20pt);
Well, isn't that embarrassing! Almost as bad as missing a semi-colon.
Thanks so much, Tim!
You're welcome! Don't feel too embarrassed. I would have expected SAS to have diagnosed those color names. Offhand I don't know why it doesn't.
Anyway, at this year's SGF in Las Vegas I gave a follow-on to the 2013 paper called (unimaginatively) A Second Look at the ODS Destination for PowerPoint. I hope you find it useful.
I was at that presentation which was very good & very informative, and it prompted me to start pestering our IT department about getting 9.4M3. So far, no luck, but I'm hoping by the end of the year. The additional features would help greatly in getting slides from SAS that could be incorporated into my organization's template without post-processing, which is my goal.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.