HI All,
I just want to create macro variable with hyper link and which will be used to display in ods PDF Output .
for ex
var1 = Google.com with hyper link.
Thanks
Why do you want to put it in a macro variable? Surely even the most changeable url will be mostly the same each time. Just use macro variables for the bit that changes, it will be a lot easier.
/* Will be a nightmare to work with */ %let var1=https://communities.sas.com/t5/forums/replypage/board-id/programming/message-id/130439; %put &var1.; /* As only message number changes */ %let var1=130439; %put https://communities.sas.com/t5/forums/replypage/board-id/programming/message-id/&var1.;
If you have lots of these, then put it in a dataset - macro is not a replacement for Base SAS.
hi ,
Thanks for reply.
but here, the thing is when I use the macro variable it replaces the text what ever we have given. But my requirement is, when I display URL through macro variable in in PDF, it should come as hyperlink (Means, in PDF when a link comes with underline, we can directly click on that to navigate). but currently macro variable is not coming with hyper link rather it just puts the required URL without Underscore.
There is a nice description and solution by Cyntia_sas here:
So you may want to make your macro variable something like
%let SAScom=^S={font_size=9pt font_face='Arial Unicode MS' url='http://www.sas.com'};
And you can use it like
ods escapechar='^';
Title "&SAScom.This is SAS";
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.