I'm creating a macro in Outlook to read file paths stored in an Excel file and create hyperlinks. I'm so close to getting it working but this last bit of code is driving me nuts. I have the string with the file path stored in a variable called FilePath. When I write the html to hyperlink the text displayed is the word FilePath instead of the string that variable is supposed to hold. I know I'm just messing up the quotations but I'm ripping out my hair trying to figure out where the right place to put them is. Here's my code:
k = 0
For i = 1 To UBound(arr)
FilePath = arr(k)
oMsg.HTMLBody = "FilePath" & "
" & oMsg.HTMLBody
k = k + 1
Next i
The hyperlink is correct and I can open the file when I click it but all the links say FilePath instead of the actual file path. Any pointers in the right direction would be greatly appreciated.