BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
SASuserlot
Barite | Level 11

I am not sure how it works or it possible or not  but will give a chance to explore myself.

I have the Idea how to do hyperlinks for webpage or folder paths in rtf using SAS. Bu I am curious to know is hyperlinking the the email is possible? email is from outlook , if we using url how we can get it?

 

 

2. Extension to first question, lets say I have an email in the middle of the string then can we make that as hyperlink? instead of whole string?

 

Image shows the clickable hyperlinks on email. Just wrote word to show.

SASuserlot_0-1666379090692.png

Thanks for your ideas.

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisHemedinger
Community Manager

I think you can do it with this technique from this SAS Note: Usage Note 24051: In ODS RTF, how can I generate HTML hyperlinks?


But instead of "https:" links, you would use "mailto:"

 

filename out temp;
ods rtf file=out;

proc report data=sashelp.class;
  column name height;
  define name / order style(header)={url="mailto:teacher@class.com"};
run;

ods rtf close;

 

Example output in Word:

ChrisHemedinger_0-1666381919560.png

 

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!

View solution in original post

4 REPLIES 4
ChrisHemedinger
Community Manager

I think you can do it with this technique from this SAS Note: Usage Note 24051: In ODS RTF, how can I generate HTML hyperlinks?


But instead of "https:" links, you would use "mailto:"

 

filename out temp;
ods rtf file=out;

proc report data=sashelp.class;
  column name height;
  define name / order style(header)={url="mailto:teacher@class.com"};
run;

ods rtf close;

 

Example output in Word:

ChrisHemedinger_0-1666381919560.png

 

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!
SASuserlot
Barite | Level 11

Yiyee..🧐 I learned something new .Thank you @ChrisHemedinger .  It resolved my first question. How about lets say how we can do it in footnote and in middle of a strings.

Ex: Footnote1 " Please email Chris at  chris@sas.com.

In the above I want to hyper link the  just email text instead of whole string ( if I use style option isn't it hyperlink whole string?

Ksharp
Super User
data have;
have='Please email Chris at  (*ESC*){style [color=blue url="mailto:chris@sas.com"] chris@sas.com} .';
run;

ods rtf file='c:\temp\temp.rtf';
proc report data=have nowd style={outputwidth=80%};
run;
ods rtf close;

You didn't learn it from my previous code yet !

Ksharp_0-1666433586412.png

 

SASuserlot
Barite | Level 11

Thank you @Ksharp . yes I learned using the style option from your previous code. But I was trying for email where I was not sure what to use instead of 'http' in url option, I was trying with 'mail' which didn't work, so I got learned from @ChrisHemedinger  and you the option should be ' mailto" , so I was able to get what I was expecting. Thank you for your time. 

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 1596 views
  • 6 likes
  • 3 in conversation