The SAS Output Delivery System and reporting techniques

ODS Powerpoint - how to change font color

Accepted Solution Solved
Reply
Contributor
Posts: 22
Accepted Solution

ODS Powerpoint - how to change font color

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;

Accepted Solutions
Solution
‎07-26-2016 01:37 PM
Super Contributor
Posts: 394

Re: ODS Powerpoint - how to change font color

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);

View solution in original post


All Replies
Grand Advisor
Posts: 17,338

Re: ODS Powerpoint - how to change font color

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

 

 

 

 

Contributor
Posts: 22

Re: ODS Powerpoint - how to change font color

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!

Solution
‎07-26-2016 01:37 PM
Super Contributor
Posts: 394

Re: ODS Powerpoint - how to change font color

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);
Contributor
Posts: 22

Re: ODS Powerpoint - how to change font color

Well, isn't that embarrassing!  Almost as bad as missing a semi-colon.  Smiley LOL

 

Thanks so much, Tim!

Super Contributor
Posts: 394

Re: ODS Powerpoint - how to change font color

[ Edited ]

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.

Contributor
Posts: 22

Re: ODS Powerpoint - how to change font color

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.

 

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 6 replies
  • 352 views
  • 2 likes
  • 3 in conversation