February 8, 2019
Hi
This is a follow on from a previous question, I have a piece of code that once a button is pressed sends an email to recipients with a hyperlink in the body of the mail which takes them to that excel document
So the bit I am having trouble with is the following code
mbody = "Hello" & vbNewLine & _
"We have a new MDF Brief In, The Project Leaders Section is complete" & vbNewLine & _
"NPD is first in the flow so please complete your section" & vbNewLine & _
"You can access the File here" & """<https://gbconnect.sharepoint.c...../MAIDSTONE COMPLETED MDF FORMS 2021/""" & ActiveWorkbook.Name
simply the ActiveWorkbook.name (The filename of the spreadsheet) is not included in the hyperlink and it needs to be
Can somebody help me with this please
Thank you in advance
Power Query
Power Pivot
Xtreme Pivot Tables
Excel for Decision Making
Excel for Finance
Excel Analysis Toolpak
Power BI
Excel
Word
Outlook
Excel Expert
Excel Customer Service
PowerPoint
November 8, 2013
A link in html looks like this:
<a href="https://www.site.com/">click here</a>
"You can access the File here: " & "<a href=""https://gbconnect.sharepoint.com/sites/BUKGBGATEPROCESS/MDF/MAIDSTONE COMPLETED MDF FORMS 2021/" & ActiveWorkbook.Name & """" & ">ActiveWorkbook.Name</a>"
Replace & with &
Replace > with >
Replace < with <
February 8, 2019
Hi Catalin,
Thank you for your response. Now the code looks like this :-
"You can access the File here: " & " <a href=""https://gbconnect.sharepoint.com/sites/BUKGBGATEPROCESS/MDF/MAIDSTONE COMPLETED MDF FORMS 2021/" & ActiveWorkbook.Name & """" & ">" & ActiveWorkbook.Name & "</a>"
And the outlook looks like this:-
Hello
We have a new MDF Brief In, The Project Leaders Section is complete
NPD is first in the flow so please complete your section
You can access the File here: <a href="https://gbconnect.sharepoint.c...../MAIDSTONE COMPLETED MDF FORMS 2021/MDF MASTER FORM - MAIDSTONE V20.xlsm">MDF MASTER FORM - MAIDSTONE V20.xlsm</a>
So only some of the hyperlink worked and we have the coding in amongst the hyperlink
As you can see, unfortunately that did not work. To be honest I had tried the a href, without success prior.
This is giving me a real headache, any other solutions / Comments
Thank you so much
Kind Regards
Richard
Power Query
Power Pivot
Xtreme Pivot Tables
Excel for Decision Making
Excel for Finance
Excel Analysis Toolpak
Power BI
Excel
Word
Outlook
Excel Expert
Excel Customer Service
PowerPoint
November 8, 2013
February 8, 2019
Hi Catalin,
I was using .body not .htmlbody, the link appears in the email perfectly now, however when I tried to open the file from the email, it opens ok right up until I click "edit workbook" , then I got an error "unknown error trying to lock file", which after sending to several people turned out to be because it was opening the file in IE instead of Chrome (Useful tip for others there!), anyway it all works perfectly now.
Thank you very much for your help
Kind Regards
Richard
1 Guest(s)