ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   broken hyperlink when I send email uuing outlook2000 (https://www.excelbanter.com/excel-programming/300008-broken-hyperlink-when-i-send-email-uuing-outlook2000.html)

Zaidan

broken hyperlink when I send email uuing outlook2000
 
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.

Dick Kusleika[_3_]

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.




K Zaidan

broken hyperlink when I send email uuing outlook2000
 
Dick Kusleika

It works, it is more like HTML code within VBA. Makes sense
Thanks


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Dick Kusleika[_3_]

broken hyperlink when I send email uuing outlook2000
 
You're welcome.

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

"K Zaidan" wrote in message
...
Dick Kusleika

It works, it is more like HTML code within VBA. Makes sense
Thanks


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!





All times are GMT +1. The time now is 12:35 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com