How to insert variable in a hyperlink

I have a variable called inputfile which contains the link to the folder that changes everyday based on todays date.

example:
inputfile =“C:/Users/Desktop/+DateTime.Now.ToString(“MM-dd-yyyy”)”

I am trying to pass this as link in send outlook message in bodysection.

I tried this method:
" these links:
<a href='+inputFile+'></a>".It doesnt work
Is there any other way to do this?

@suchitra.nagarajan

1 Like

Hi @suchitra.nagarajan,

  1. Use assign for inputfile & if you’re storing file name in inputfile variable then you should specify file extension too. So, in following example I’ve used .xlsx so have to put your file extension there.
    inputfile = "C:/Users/Desktop/"+DateTime.Now.ToString("MM-dd-yyyy")+".xlsx"

  2. Send outlook message body should be like…
    "these links:<br><a href='"+inputFile+"'></a>."
    here you can eliminate <br> it’ll basically take link in newline but if want link right after " these links:" then you can eliminate.

  3. Set IsBodyHtml as checked.
    —> image

that’s it. :blush:

1 Like