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.
 
M

Michael Bauer [MVP - Outlook]

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 - MVP Outlook

: Outlook Categories? Category Manager Is Your Tool
: VBOffice Reporter for Data Analysis & Reporting
: <http://www.vboffice.net/product.html?pub=6&lang=en>


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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top