Hyperlinks in e-mail

Add-in Express™ Support Service
That's what is more important than anything else

Hyperlinks in e-mail
 
David Anson




Posts: 8
Joined: 2004-11-22
Almost there now, just a few minor glitches to sort out.

I am having a problem creating an e-mail which has active hypertext links - the links are visible on the screen as blue underlined text but the cursor does not change to a hand pointer when over them.

The creation process is quite straight forward,

OLItem : = OutlookApp.CreateItem(0);
OLItem.To := FieldNyName('Email').asString;
OLItem.Subject := 'Subject';
OLItem.HTMLBody := FieldNyName('Email Body').asString;
OLItem.Send;

I have even tried cutting and pasting the HTML text from an existing e-mail using the ADX Toys Show Message Content example and pasting it in to the relevant database field. While it all looks identical the hypertext links just do not work.
Posted 20 Dec, 2004 03:18:30 Top
Dmitry Kostochko


Add-in Express team


Posts: 2745
Joined: 2004-04-05
Hello David,

What Outlook version you use? The code below has just been tested with Outlook 2003 and works well. After receiving this test message the hyperlink is shown correctly and works. Did you send your test message or did you trap them before sending? If you trapped them then it is quite normal because hand point cursor is to appear only in received HTML messages.

procedure TAddInModule.adxOlExplorerCommandbar1Controls0Click(Sender: TObject);
var
IMail: _MailItem;
begin
IMail := OutlookApp.CreateItem(olMailItem) as _MailItem;
try
IMail.To_ := 'noname@domain.com';
IMail.Subject := 'test message';
IMail.HTMLBody :=
'<HTML><HEAD><TITLE></TITLE></HEAD>' + #13#10 +
'<BODY>' + #13#10 +
'test message<br><
A href="//www.add-in-express.com"
>
Add-in Express home page
</A>' + #13#10 +
'</BODY>' + #13#10 +
'</HTML>' + #13#10;
IMail.Send;
finally
IMail := nil;
end;
end;
Posted 20 Dec, 2004 05:54:12 Top
David Anson




Posts: 8
Joined: 2004-11-22
[/QUOTE]

I was trapping before sending. I will send it to myself and hopefuly tha should be OK. (It is 2003 I am using by the way)
Posted 20 Dec, 2004 06:22:05 Top
Dmitry Kostochko


Add-in Express team


Posts: 2745
Joined: 2004-04-05
Have checked? Does it all work?
Posted 20 Dec, 2004 08:00:45 Top