View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dick Kusleika[_3_] Dick Kusleika[_3_] is offline
external usenet poster
 
Posts: 599
Default broken hyperlink when I send email uuing outlook2000

Zaidan

You can use the HTMLBody property to show a hyperlink, like this

Sub SendLink()

Dim olApp As Outlook.Application
Dim olMi As Outlook.MailItem

Set olApp = New Outlook.Application
Set olMi = olApp.CreateItem(olMailItem)

With olMi
.To = "
.Subject = "Click this link"
.HTMLBody = "<a href=""http://www.dicks-blog.com""TRACK</a"
.Send
End With

Set olMi = Nothing
Set olApp = Nothing

End Sub

--
Dick Kusleika
MVP - Excel
Excel Blog - Daily Dose of Excel
www.dicks-blog.com

"Zaidan" wrote in message
om...
I have wrote some vba code that sends email from excell2000 via
outlook2000.
In the email I send is a link to webpage, this link is long (over 80
characters), and the problem the email gets to my customers with
broken hyperlinks. Sometimes broken into two lines and others into
three lines, so the link doesn't work.
The problem is really not with the vba code, because it does it even
when I send it manually.
I think it is a setting within outlook when receiving, or maybe
something else.

Also, I would like to know how I can make this hyperlink just a short
word and it still takes you to the url that I have in mind. In other
words how can someone make any word (i.e. click on this TRACK to see
the status). The word TRACK is a hyperlink with a url that I want my
customer be able to goto.