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

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:
 
S

Sue Mosher [MVP-Outlook]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top