How to get my filename as hyperlink in VB Script
Hi in below code in strContent in ahref it shows file name how to add link to that file so that I can open file directly can anyone help me to do thisdim strContent
strContent=""
Set objFolder = objFso.GetFolder (strPath)
For Each objFile In objFolder.Files
If objFso.GetExtensionName (objFile.Path) = "pdf" Then
if objFile.DateLastModified > dateadd("d", -6, Now) then
strContent = strContent +"<li>"+ objFile.name + "</li>"
MsgBox(strContent)
end if
End If
Next
if strContent<>"" then
strContent = "<ul>" + strContent + "</ul>"
Set MyEmail=CreateObject("CDO.Message")
MyEmail.Subject="Test News Updates"
MyEmail.From="supraja.sarabu@pacificlight.com.sg"
MyEmail.To="supraja.sarabu@pacificlight.com.sg"
MyEmail.HTMLBody ="<body style=""font-family:arial;color:#0070C0;font-size:15px;"">Dear All,<br><br>Here are the news update for today, which can be found in <a href=""http://doclight/RegulationandCorpComms/Regulation%20and%20Corp%20Comms%20Library/Corp%20Comms/External%20Press%20Monitoring/"+yr+""">"+yr+" News Monitoring"</a><br>"+ strContent +"<br><p style=""font-family:arial;color:#000000;font-size:13px;""><br></p></body>"
MyEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing")=2
MyEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver")="mail1.pacificlight.local"
MyEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport")=25
MyEmail.Configuration.Fields.Update
MyEmail.Send
set MyEmail=nothing
end if