V
VTB
Hi all, Im new to this forum so be gentle with me.
I have set up a macro in Excel to send out HTML emails with hyperlinks to XLS files.
The string value for the link to a XLS file is in a cell on a worksheet.
myFile = Range("A1")
The string value in "A1" is as follows: "C:\CFSN\ISS Projects\ProGenII.xls"
I have no problem getting the hyperlink into the email. The problem is that where there is a spaces in the string value, the hyperlink that ends up on the email has a links that only represent the the string upto the first space.
In the above example, the hyperlink reference on the email would be
"C:\CFSN\ISS"
__________________________________________________________
Here is a snippet of the code for this:
Dim myFile as String
myFile = Range("A1")
myItem.HTMLBody = "<HTML><BODY><A href=" & myFile & ">Click Here to open the file</BODY></HTML>"
__________________________________________________________
I have tried putting a '%' symbol in place of the space, I have tried the '<>' brackets at the start and end of the cell contents, I have tried both together.
I seriously need some help with this one.
Any Idea's, Vincent...
PS. I have put together an example workbook of the problem that I can send through to anyone who is prepared to take a look at my problem.
Thanks in advance.
I have set up a macro in Excel to send out HTML emails with hyperlinks to XLS files.
The string value for the link to a XLS file is in a cell on a worksheet.
myFile = Range("A1")
The string value in "A1" is as follows: "C:\CFSN\ISS Projects\ProGenII.xls"
I have no problem getting the hyperlink into the email. The problem is that where there is a spaces in the string value, the hyperlink that ends up on the email has a links that only represent the the string upto the first space.
In the above example, the hyperlink reference on the email would be
"C:\CFSN\ISS"
__________________________________________________________
Here is a snippet of the code for this:
Dim myFile as String
myFile = Range("A1")
myItem.HTMLBody = "<HTML><BODY><A href=" & myFile & ">Click Here to open the file</BODY></HTML>"
__________________________________________________________
I have tried putting a '%' symbol in place of the space, I have tried the '<>' brackets at the start and end of the cell contents, I have tried both together.
I seriously need some help with this one.
Any Idea's, Vincent...
PS. I have put together an example workbook of the problem that I can send through to anyone who is prepared to take a look at my problem.
Thanks in advance.