BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Pyrite | Level 9

I've figured out that I have to save the Results in RTF format, then copy the graph and Paste-special into Powerpoint as Picture (Enhanced Metafile), ungroup several times, then start the clean-up for presentation and/or publication. Does anyone have a better solution?




Accepted Solutions
Pyrite | Level 9

Thanks for all the feedback, guys.  I have posted this in the University Edition forum.  Maybe someone from SAS will see it there and help out, but if not, I can live with saving as RTF, then copy-specialing into Powerpoint and ungrouping.  Reeza's early suggestion for creating completely separate graphs of each series using by-group processing is also a good way to get the elements of each series clear of all the other series, so it can be grouped and then added animination-wise to a full plot.

View solution in original post

Pyrite | Level 9

Thanks for the link.  After perusing the page, I tried some code that seemed reasonable to me, but of course it didn't work. See below for the log. I hope you can tell me what's wrong. The details of the proc sgplot are irrelevant, although I'd also be grateful for advice on a simple default setting to do everything black without having to specify every element.


Thanks also for the suggestion about getting the graphs picture perfect in SAS to start with.  That would require many hours of struggling with the code, and I still wouldn't be able to animate the components of the slide (e.g., start with the axes, then wipe from the left consecutively each of several time series).


When I tried to post this message, I got this error: "Your post has been changed because invalid HTML was found in the message body. The invalid HTML has been removed. Please review the message and submit the message when you are satisfied."  I can't see any changes in the message. 




NOTE: ODS statements in the SAS Studio environment may disable some output features.
57 ods html close;
58 ods powerpoint file="D:\Will's Documents\Projects\_NIH\Paul Solberg\IAAF study\slide.ppt" nogtitle;
59 run;
61 title3 "and number of deltas>10";
62 title4 "Plot of means and SDs";
63 ods graphics / reset imagemap;
64 proc sgplot data=WORK.DELTALNPERF1 uniform=all noautolegend;
65 scatter x=Age y=DeltaMean / transparency=0.0 name='Scatter' filledoutlinedmarkers
66 markerattrs=(symbol=circlefilled size=10 color=black)
67 markerfillattrs=(color=black)
68 yerrorupper=DeltaMeanPlusSD yerrorlower=DeltaMeanMinusSD
69 errorbarattrs=(color=black);
70 xaxis grid;
71 yaxis grid;
72 refline 0;
73 reg x=Age y=DeltaMean / nomarkers lineattrs=(color=black thickness=1);
74 by event sex;
75 where NoOfDeltas>10;
76 run;
NOTE: PROCEDURE SGPLOT used (Total process time):
real time 0.90 seconds
cpu time 0.51 seconds
NOTE: There were 30 observations read from the data set WORK.DELTALNPERF1.
WHERE NoOfDeltas>10;
77 ods graphics / reset;
78 ods powerpoint close;
ERROR: Insufficient authorization to access /opt/sasinside/SASConfig/Lev1/SASApp/D:\Will's Documents\Projects\_NIH\Paul
Solberg\IAAF study\slide.ppt.
79 ods html;
NOTE: Writing HTML Body file: sashtml69.htm
ERROR: Insufficient authorization to access /opt/sasinside/SASConfig/Lev1/SASApp/sashtml69.htm.
ERROR: No body file. HTML output will not be created.
80 run;
Super User

The error helps...

ERROR: Insufficient authorization to access /opt/sasinside/SASConfig/Lev1/SASApp/D:\Will's Documents\Projects\_NIH\Paul
Solberg\IAAF study\slide.ppt.


You've specified your output file incorrectly. Use whatever method you did for RTF file, it's the same process to create a file. 

Pyrite | Level 9

Sorry, that was stupid of me not to get the right directory structure to output the file. I forgot to include the usual  "/folders/myshortcuts/" in front of the destination.


So I managed to send the graph directly to a powerpoint file, thank you, but unfortunately the resulting graph is a picture of some sort, not an editable vector graphic.


Does anyone have an elegant solution to getting editable graphs into Powerpoint (or other vector-graphics editor), or am I stuck with saving as an RTF and copying as a metafile? This question is surely important for most researchers?  I have not had to bother in my previous 30+ years of work with SAS, because I always pasted data from SAS listings into Excel or other graphing package and went from there into Powerpoint (or I gor my students to do it). Now, however, I am promoting SAS Studio with all my colleagues and students, and they can now expect to become independent SAS users, so I feel obliged to provide them with a more efficient graphing solution.



Super User

I think one of the image types should work for you. 

See the various options available for each destination.


To be frank, teaching anyone to edit a graph manually seems a waste of time. Like I mentioned above, using SGPLOT, SGTemplate and templates in general, you can customize your graphs for publication quality. It's not as 'easy' but the majority of sciences and research nowadays does require some level of proficiency with programming.  

Pyrite | Level 9

Reezam, thanks for your continued help with my problem, and I apologize for not making the most of SAS graphics over the years. I gave up with gplot years ago when confronted with the necessary complexity of the code, my students and colleagues had absolutely no chance of learning SAS before SAS Studio came along, and it gave them a sense of involvement and ownership of the results when I fired text output at them to turn into graphs.. Anyway, when I have a spare week or two I will see if I can work out the code to produce a Powerpoint slide that would successively wipe in from the left first the axes and then each of several time series.



ods graphics / reset imagemap outputfmt=emf;

...produced a graph in Powerpoint that, when I ungrouped it, turned into a blank square.  Furthe ungroupings and/or deletions did not lead to recovery of the graph.


I also got these warnings...

WARNING: html5 destination does not support EMF images. Using the default static format.
WARNING: PDF destination does not support EMF images. Using the default static format.

...even though I had issued ods html close; ods pdf close;  No doubt the syntax of these commands is incorrect, although it shouldn't be.



Super User

Create multiple graphs, one with just axes, then one with each of your time series progressively, ie slide with 1, slide with 2, etc..

It won't have the slide in from the left effect that you want, but each time series will appear next on graph. 


Pyrite | Level 9

Hi again, guys.  This problem was only partially resolved. The suggestion by Reeza to build the graphic in stages was a good one.  However, as I messaged earlier, I was eventually able to output a graph directly to a Powerpoint file, but when I ungrouped it (to edit it), it disappeared.  I also got some warnings that indicate some issues with background graphics ods options.  Can anyone using Studio/University Edition tell me the ods commands that will generate an editable vector graphic in Powerpoint?  Thanks.  I'm in a Windows 7 environment.



Pyrite | Level 9
Office 2010.

##- Please type your reply above this line. Simple formatting, no
attachments. -##
Super User

Unfortunately I can't test your issues, as I'm using SAS Studio on a Mac and I can't even get the graph to ungroup in Word 😞


I might suggest reposting this question under ODS GRAPHICS forum and/or contacting SAS Tech Support directly. 

Pyrite | Level 9

Thanks for the suggestion about posting to the ODS GRAPHICS forum.  I went to the SAS Communities pages but was unable to find such a forum.  Most of the time I wasn't even sure what I was looking at. Sorry.

Super User

I've moved this question into the forum, but you can post a new question if you'd like as well. 

The link is below as well:

Super User
If I was right, you are using University Edition.
Change the path into SHARE path, of course, you need set it up before starting UE.

 ods powerpoint file="D:\Will's Documents\Projects\_NIH\Paul Solberg\IAAF study\slide.ppt" nogtitle;


 ods powerpoint file="/folders/myfolders/slide.ppt" nogtitle;



Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg



Back in the Classroom!

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

View all other training opportunities.

Discussion stats
  • 16 replies
  • 3 in conversation