0

I am trying to send a link to a location on our servers via email, but I can't get the HTML portion of the link to work.

This is my file path-- P:\2. Corps\PNL_Daily_Report

What I've tried--

newMail.HTMLBody ='<a href="file://///P:\2.%20Corps\PNL_Daily_Report">Link Anchor</a>'
newMail.HTMLBody ='<a href="P:\2. Corps\PNL_Daily_Report">Link Anchor</a>'
newMail.HTMLBody ='<a href="P:\2.%20Corps\PNL_Daily_Report">Link Anchor</a>'

Obviously I am not an HTML guy, so i bet this answer will be quick for someone who is. Any ideas on how to get the HTML link to format?

ccraig90
  • 43
  • 7

1 Answers1

0

According to this article on MSDN Blog, your href should be:

<a href="file:///P:/2.%20Corps/PNL_Daily_Report">Link Anchor</a>

Windows path is a significant break from UNIX-style path, and the internet mostly uses Unix convention.

  • file:// indicate the scheme (the other popular schemes are http:// and ftp://)
  • P: refers to the drive, or the mounting point in Unix's file systems
  • / means root, or the ultimate point that refers to a file system
  • The backward slash (\) is the Windows' path separator, but Unix's is the forward slash (/)
Code Different
  • 90,614
  • 16
  • 144
  • 163