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
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
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):
Example 2 (1 in):
Example 3 (tiny .1in):
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
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
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.