How to insert a link into email.body in Visual Basic?

  • Thread starter Thread starter MatrimCauthon
  • Start date Start date
M

MatrimCauthon

Hello,

how can one insert a link/shortcut (to a local file) in the email
body?

Do I need to distinguish between HTML, PlainText and RichText ?

For Plaintext and Richtext the following seems to work:

Code:
--------------------

objMsg.Body = objMsg.Body & vbCrLf & "<file://" & strFileName & ">"

--------------------

Doing this in html mails leads to some strang behaviour, eg multiple
such statements leads to something like this:
<<<file://C:\myfirst.file>>>
<<file://C:\mysecond.file>>
<file://C:\mythird.file> and so on.

Another problem is, when I use the code I mentioned above in plain and
rich text mails, im converting them to html, the links aren't
clickable.

So I guess I'm missing a valid point.

In sum of all this, back to my first question:
 
In HTML, you should need add an <a> tag to HTMLBody.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Back
Top