A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Add Hyperlink in Email Body by VBA



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old April 23rd 09, 04:11 PM posted to microsoft.public.outlook.program_vba
K[_3_]
external usenet poster
 
Posts: 2
Default Add Hyperlink in Email Body by VBA

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.
Ads
  #2  
Old April 23rd 09, 06:13 PM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default Add Hyperlink in Email Body by VBA



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:

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.

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA to insert Hyperlink in Email Body K[_3_] Outlook and VBA 0 April 23rd 09 03:55 PM
Hyperlink Title in Outlook email body Jon Lewis Outlook - General Queries 4 June 21st 08 10:09 AM
Use VBA to insert hyperlink in Task Body showme1946 Outlook and VBA 25 October 8th 07 07:21 PM
How to display text of a hyperlink in an email body? salad Outlook and VBA 3 June 28th 07 07:39 PM
Hyperlink in body/notes area of appointment Conan Kelly Outlook and VBA 1 April 28th 06 01:20 AM


All times are GMT +1. The time now is 05:03 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.