I need to achieve selecting a button from MS Word and then getting a hyperlink in a email with the full UNC path to a document saved on the server.
I so far have achieved selecting a button within MS Word which captures the UNC network path name and document name and stores the full location in a variable.
I have got Outlook to open but whilst using the .HTMLBody text I can't seem to find a way for Outlook to insert the a hyperlink using my stored variable.
I found this line of code and modified it with my code and this didnt work -
.HTMLBody = "<a href=file://" & myAddFileName & ">" & myAddFileName & "</a>"
myAddFileName is the variable I need to use. Could somebody please tell me how I can get this to work using the .HTMLbody property?
Please see a snipet of the code below -
'Creates the e-mail
Set MyMail = MyOutlook.CreateItem(olMailItem)
With MyMail
'Set the properties for the email
.To = ""
.Subject = ""
.HTMLBody = myAddFileName
End With
I so far have achieved selecting a button within MS Word which captures the UNC network path name and document name and stores the full location in a variable.
I have got Outlook to open but whilst using the .HTMLBody text I can't seem to find a way for Outlook to insert the a hyperlink using my stored variable.
I found this line of code and modified it with my code and this didnt work -
.HTMLBody = "<a href=file://" & myAddFileName & ">" & myAddFileName & "</a>"
myAddFileName is the variable I need to use. Could somebody please tell me how I can get this to work using the .HTMLbody property?
Please see a snipet of the code below -
'Creates the e-mail
Set MyMail = MyOutlook.CreateItem(olMailItem)
With MyMail
'Set the properties for the email
.To = ""
.Subject = ""
.HTMLBody = myAddFileName
End With