Add Hyperlink in Email Body by VBA

K

K

Sub SETLINK()

ActiveSheet.Hyperlinks.Add Anchor:=Range("A78"), Address:= _

RECORDS.xlsx, _

TextToDisplay:="HERE"

End Sub

Hi all, I want to add Hyperlink in Email Body by using above macro.

I just want to know that I have created above macro in excel but I

want to have same macro in outlook so what should I put in above code

where it say "ActiveSheet" and "Range("A78"). I assume it might be

"Obj.Body" or something but i want some friend to give me bit help.
 

Michael Bauer

Senior Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
This works for the active e-mail:

Dim Mail as Outlook.MailItem

Set Mail=Application.ActiveInspector.CurrentItem

Mail.HTMLBody="<a href='your link'>click me</a>"

Best regards

Michael Bauer

Am Thu, 23 Apr 2009 08:11:22 -0700 (PDT) schrieb K:


> Sub SETLINK()
> ActiveSheet.Hyperlinks.Add Anchor:=Range("A78"), Address:= _
> RECORDS.xlsx, _
> TextToDisplay:="HERE"
> End Sub

> Hi all, I want to add Hyperlink in Email Body by using above macro.
> I just want to know that I have created above macro in excel but I
> want to have same macro in outlook so what should I put in above code
> where it say "ActiveSheet" and "Range("A78"). I assume it might be
> "Obj.Body" or something but i want some friend to give me bit help.
 

Similar threads

Top