BookmarkSubscribeRSS Feed
hmbrule
Calcite | Level 5

Hi!

I am trying to write a script that automatically generates corporate layout powerpoint slides for my SAS (Studio) output. However, I am currently struggling with the margin settings in Powerpoint. I need to lower the page number and footer on the slides or in other words, move them closer to the edges because of the corporate design. 

 

I cant find any information on how to do it and the only thing that might work is to use ods layout absolute to specify location of the footer but that command doesn't work for Powerpoint. Using the topmargin/margintop ++ settings doesn't either seem to change anything. 

 

Is there anyone here that have been able to "delete" all Powerpoint preset "rules" and to specify where each slide-element should be placed? 

/Hanne

4 REPLIES 4
DarthPathos
Lapis Lazuli | Level 10

Hi Hanne

 

I hope you're doing well.  It's been a while since I've used ODS output for Powerpoint, so apologies I can't be much help.  I've looked in my books I have on ODS and can't seem to find anything.  Having said that, I found this link that may be of use.  Specifically, the line right near the bottom:

goptions hsize=3in vsize=3in dev=png;

If i'm remembering my ODS correctly, the hsize and vsize can be modified to make the image as big or as small as needed on the slide.  If my memory is correct, this should force the footers down - so it's not so much changing the footer directly as changing the content of the slide.  

 

If you are able to purchase SAS Books, I highly recommend the book Output Delivery System: The Basics and Beyond; although it doesn't specifically talk about Powerpoint, it does cover a lot of other good information you may find useful.  If this isn't what you need (or you've already tried it) let me know and I can do some more digging.

Chris

 

Has my article or post helped? Please mark as Solution or Like the article!
Cynthia_sas
SAS Super FREQ

Hi:

  As far as I know, if you want to change the position of the header or footer items on a slide, you have to change the "master" slide by physically moving the placeholder text box on the Master Slide from inside PowerPoint. I do not know whether you can move these elements  using SAS code. That would be a question for Tech Support.

 

  I can change the size of the graphs on the page using either GOPTIONS or ODS GRAPHICS statements. But graph size is unrelated to margins or footer placement.

 

  In PowerPoint, like RTF and PDF, I can change the margins with an OPTIONS statement. I find that the OPTIONS statement changes the margins, but also moves the footer and header accordingly, as shown in the output below (code does not use graphs because only point was to illustrate impact of margin change):

title h=12pt bold '1) Margin test .5in all around';
options orientation=landscape topmargin=.5in bottommargin=.5in 
        leftmargin=.5in rightmargin=.5in;
ods powerpoint file="c:\temp\test_half_inch_margin.pptx";

proc print data=sashelp.class(obs=1) noobs
  style(report)={width=100%}
  style(header)={fontsize=12pt}
  style(data)={fontsize=12pt};
run; 
 
ods powerpoint close;

title h=12pt bold '2) Margin test 1in all around';
options orientation=landscape topmargin=1in bottommargin=1in 
        leftmargin=1in rightmargin=1in;

ods powerpoint file="c:\temp\test_1_inch_margin.pptx";

proc print data=sashelp.class(obs=1) noobs
  style(report)={width=100%}
  style(header)={fontsize=10pt}
  style(data)={fontsize=10pt};
run; 
 
ods powerpoint close;


title h=12pt bold '3) Margin test tiny margin all around';
options orientation=landscape topmargin=.1in bottommargin=.1in 
        leftmargin=.1in rightmargin=.1in;

ods powerpoint file="c:\temp\test_tiny_margin.pptx";

proc print data=sashelp.class(obs=1) noobs
  style(report)={width=100%}
  style(header)={fontsize=10pt}
  style(data)={fontsize=10pt};
run; 
 
ods powerpoint close;
title;

Results are below.. note how footer position shifts with margin:

Example 1 (.5in):

ppt_half_inch_margin.png

 

Example 2 (1 in):

ppt_1in.png

 

Example 3 (tiny .1in):

ppt_tiny_margin.png

 

  You'll have to ask Tech Support whether there's another way to impact the footer placement with code or whether you have to alter the footer placement in the Master slide. The above was not intended to get into issues of resizing graphs because that is fairly straightforward and not related to margin or footer placement. Since I could stretch PROC PRINT to 100% in width to show where the margins in each example were going to fall, and since I change the margins with the OPTIONS statement, the above code illustrates how the footers are impacted by margin settings (not graph size).

 

Cynthia

hmbrule
Calcite | Level 5
Thank you for the suggestions!

It seems like the 0.25in is the minimum between the edge and the footer, as it doesnt change position when changing between 0.25in and 0.1in.

Do you know it is possible with a command that just "Remove all predefined rules and limits" in powerpoint that could be used?
DarthPathos
Lapis Lazuli | Level 10

After doing some more poking around (digging around numerous notebooks and folders) I can confirm that the only way to do this is as @Cynthia_sas suggested - modify the actual PowerPoint master template.  That way you'll only need to do it once, and it'll always have the same look and feel as other presentations you work on.  Here's the Microsoft page showing how to do this - I've done this before but not related to a SAS Output (rather, I needed to modify and add a logo to my slides).  I hope this helps 🙂

Chris

Has my article or post helped? Please mark as Solution or Like the article!

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 6230 views
  • 4 likes
  • 3 in conversation