Hello All
I have a script which emails my team once a file has been created every sunday night. The file is named like so:
Backup Report For WC - 20060709.xls
I have this code in my script to send the mail:
Set SMTP = CreateObject("CDO.Message")
SMTP.From = "test@test.com"
SMTP.To = "test@test.com"
SMTP.Subject = "Check Backup Report"
SMTP.HTMLBody = "<li ><a href='x:\IT\Service Delivery\Production Environment Management\Networks and Telephony\Backups\Backup Reports\'>Backup Report</a></li>"
SMTP.Configuration.Fields.Item _
(" = 2
SMTP.Configuration.Fields.Item _
(" = "server"
SMTP.Configuration.Fields.Item _
(" = 25
SMTP.Configuration.Fields.Update
SMTP.Send
This all works fine, but the email creates a hyperlink to the folder where the file is located. I want the hyperlink, when clicked, to open the file. The the problem is the file is appended with the date each time its created.
How can i change this line:
SMTP.HTMLBody = "<li ><a href='x:\IT\Service Delivery\Production Environment Management\Networks and
Telephony\Backups\Backup Reports\'>Backup Report</a></li>"
To open a file with a different date each time. If it helps the date will always be a sunday!
Any help would be appreciated.
Cheers
Rob
I have a script which emails my team once a file has been created every sunday night. The file is named like so:
Backup Report For WC - 20060709.xls
I have this code in my script to send the mail:
Set SMTP = CreateObject("CDO.Message")
SMTP.From = "test@test.com"
SMTP.To = "test@test.com"
SMTP.Subject = "Check Backup Report"
SMTP.HTMLBody = "<li ><a href='x:\IT\Service Delivery\Production Environment Management\Networks and Telephony\Backups\Backup Reports\'>Backup Report</a></li>"
SMTP.Configuration.Fields.Item _
(" = 2
SMTP.Configuration.Fields.Item _
(" = "server"
SMTP.Configuration.Fields.Item _
(" = 25
SMTP.Configuration.Fields.Update
SMTP.Send
This all works fine, but the email creates a hyperlink to the folder where the file is located. I want the hyperlink, when clicked, to open the file. The the problem is the file is appended with the date each time its created.
How can i change this line:
SMTP.HTMLBody = "<li ><a href='x:\IT\Service Delivery\Production Environment Management\Networks and
Telephony\Backups\Backup Reports\'>Backup Report</a></li>"
To open a file with a different date each time. If it helps the date will always be a sunday!
Any help would be appreciated.
Cheers
Rob