The SAS Output Delivery System and reporting techniques

Changing ODS Powerpoint Slide Title Size

Accepted Solution Solved
Reply
Contributor krm
Contributor
Posts: 26
Accepted Solution

Changing ODS Powerpoint Slide Title Size

I am trying to publish various charts that are created in SAS into powerpoint slides. However when I try to change the title size using 

 

ods powerpoint  layout=twocontent;
title1 height=32pt " CHART TITLE" ;

 

SAS output font is always 42pt. 

 

on the other hand if I use 

 

ods powerpoint layout=_null_;
title height=32pt "CHART TITLE";

 

the font changes. 

 

I figured that I can use proc template to modify existing layouts (such as : twocontent), however I couldn't find an example in the SAS documentation so far that I can use. The examples that I found are mainly for ODS pdf outputs.

 

 

 


Accepted Solutions
Solution
‎12-17-2015 04:31 PM
Super Contributor
Posts: 394

Re: Changing ODS Powerpoint Slide Title Size

Instead of modifying the layout template (which you can't do), modify the style template. This works for me using SAS 9.4M3:

 

ods path (prepend) work.templat(update);
proc template;
   define style styles.mystyle;
      parent = styles.powerpointlight;
      class SystemTitle /
         fontsize=32pt;
   end;
run;

proc sort data=sashelp.class out=class;
   by sex;
   run;

ods powerpoint file="test.pptx" style=styles.mystyle;
ods powerpoint layout=twocontent(advance=bygroup) nogtitle;
title1 'CHART TITLE';
proc sgplot data=class;
	by sex;
	vbar name /response=height;
run;
ods powerpoint close;

View solution in original post


All Replies
Solution
‎12-17-2015 04:31 PM
Super Contributor
Posts: 394

Re: Changing ODS Powerpoint Slide Title Size

Instead of modifying the layout template (which you can't do), modify the style template. This works for me using SAS 9.4M3:

 

ods path (prepend) work.templat(update);
proc template;
   define style styles.mystyle;
      parent = styles.powerpointlight;
      class SystemTitle /
         fontsize=32pt;
   end;
run;

proc sort data=sashelp.class out=class;
   by sex;
   run;

ods powerpoint file="test.pptx" style=styles.mystyle;
ods powerpoint layout=twocontent(advance=bygroup) nogtitle;
title1 'CHART TITLE';
proc sgplot data=class;
	by sex;
	vbar name /response=height;
run;
ods powerpoint close;
Contributor krm
Contributor
Posts: 26

Re: Changing ODS Powerpoint Slide Title Size

@Tim_SAS thank you very much for your response. 

 

It's great to know that I cannot modify the layout template as that's why I have been trying. 

 

Also if I want to modify other title sizes (not the main title but the smaller ones) in the same slide, should I do it under the same class statement? 

Super Contributor
Posts: 394

Re: Changing ODS Powerpoint Slide Title Size

There are 10 SystemTitle classes, one for each possible title statement. Their names are SystemTitle (for title1) and SystemTitle2-SystemTitle10. If you want to modify the style for title2 use the SystemTitle2 class. When you modify one of the SystemTitle classes, all of the higher-numbered SystemTitle classes automatically get the modification as well. So if you set the fontsize of SystemTitle2 to, say, 24pt, then SystemTitle3-SystemTitle10 get that fontsize. The PowerPointLight and PowerPointDark styles specify that SystemTitle uses fontsize=42pt, SystemTitle2 uses fontsize=24pt, and SystemTitle3-SystemTitle10 uses fontsize=20pt.

 

 

You can read more about ODS styles here.

 

Here's how to view the PowerPointLight and PowerPointDark styles that we supply for the destination for PowerPoint.

 

Good luck!

Contributor krm
Contributor
Posts: 26

Re: Changing ODS Powerpoint Slide Title Size

Thank you @Tim_SAS great information! 

 

Yes I could get the custom font sizes as you mentioned in your post by using the line below. 

 

proc template;
define style styles.mystyle;
parent = styles.powerpointlight;
class SystemTitle /
fontsize=28pt;
class SystemTitle2 /
fontsize=20pt;
end;
run;

 

 

Post a Question
Discussion Stats
  • 4 replies
  • 594 views
  • 1 like
  • 2 in conversation