Villalobos
Active Member
Hello,
I would like to send a hyperlink of a excel file via e-mail.
My problem is that I can not write a text and hyperlink in one body and I would like to put my official signature also into it.
Could somebody help me how should I change the below mentioned code? Or other way?
This my code:
I would like to write this into the body:
"Hello guys,
Here you find the hyperlink to the updated file: HYPERLINK.
Mr. X.Y"
I would like to send a hyperlink of a excel file via e-mail.
My problem is that I can not write a text and hyperlink in one body and I would like to put my official signature also into it.
Could somebody help me how should I change the below mentioned code? Or other way?
This my code:
Code:
Sub Hyperlink()
Dim OutApp As Object
If MsgBox("Would you like to send this hyperlink of workbook?", vbYesNo + vbQuestion, _ "Question for you") = vbYes Then
Dim OutMail As Object
Dim strbody As String
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
strbody = "<HTML><BODY>"
strbody = strbody & "<A href=C:\...\...\...\...\...>C:\...\...\...\...\...\...</A>"
strbody = strbody & "</BODY></HTML>"
On Error Resume Next
With OutMail
.To = "test[EMAIL='test.@test.com']@test.com[/EMAIL]"
.BCC = "test[EMAIL='test.@test.com']@test.com[/EMAIL]"
.Subject = "test file"
.HTMLBody = strbody
.Send
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
End If
End Sub
I would like to write this into the body:
"Hello guys,
Here you find the hyperlink to the updated file: HYPERLINK.
Mr. X.Y"