creating a hyperlink in VB

NigelShaw

Registered User.
Local time
Today, 13:45
Joined
Jan 11, 2008
Messages
1,575
Hi,

ihave created a procedure that adds an appointment to Outlook. in the routine is a .Body section that adds the message to the body of the appointment. how can i create a hyperlink in VB so it can be clicked in the appointment? i can certainly add the text and in the appointment itself, i can hightlight text and rightclick to add the hyperlink but i am wanting this to be automated.

any help greatly appreciated


Nigel
 
Try this in your:
.body = <HTML><BODY><A HREF="YOUR URL HERE">YOUR LINK TEXT HERE</A><BODY></HTML>
 
Hi James

That doesn't work. It goes red when I leave the code line. I also tried "" around the text but still errors.

I also tried

Dim hypLink As Hyperlink
HypLink = www.mylink.com

.body = "my text " & hyplink

But that didn't work.
I also enclosed the address with "" but again, it didn't work

Nigel
 
Have you tried:
.body = "<HTML><BODY><A HREF=YOUR URL HERE>YOUR LINK TEXT HERE</A><BODY></HTML>"
 
Hi,

i have tried that too. basically, i get exactly what is written so in my body of the appointment, it shows

<HTML><BODY><A HREF=www.myurl.co.uk>click here</A><BODY></HTML>


regs,

Nigel
 
Hi James,

i am adding an appointment to my calendar. i dont think i can change the type of appointment between html, rtf or txt. all i know is, in the appointment itself, i can highlight text and create a hyperlink manually so thought there must be a way of doing this with code as the appointment is to be set from Access automatically to give the user an option to click the hyperlink for a re-direction.


regs,

nigel
 

Users who are viewing this thread

Back
Top Bottom