Outlook autoformat when writing to Email.Body ?

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

MatrimCauthon

Hello,

is there something like an autoformat whenever one adds a string to th
mailbody?
I noticed this because I've a link in the message like:
<file:///C:/MyDir/MyFile.dat>
After I inserted the 2nd link the first one becomes:
<<file:///C:/MyDir/MyFile.dat>>

And after some insertions it looks kinda weird...

Any ideas?

Mat
 
Strings that are URL's of some kind or mailto links are automatically
formatted.
 
Ken said:
Strings that are URL's of some kind or mailto links ar
automatically
formatted.


Is there a way to disable this?
Or is there another solution when I'm writing multiple urls one by on
to the mail body?

Thank you so far,

Mat.
 
I don't know of a way to disable that.




MatrimCauthon said:
Strings that are URL's of some kind or mailto links are
automatically
formatted.


Is there a way to disable this?
Or is there another solution when I'm writing multiple urls one by one
to the mail body?

Thank you so far,

Mat.
 
Have you considered using HTMLBody instead of Body?

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



MatrimCauthon said:
Strings that are URL's of some kind or mailto links are
automatically
formatted.


Is there a way to disable this?
Or is there another solution when I'm writing multiple urls one by one
to the mail body?

Thank you so far,

Mat.


 
I haven't considered using HTMLBody instead of body until you mentione
it.
But doing so I stumbled again. It seems I can't modify HTMLbody exactl
as I did with body. Some modifications just don't show any effect.

As an example:
As I told above im adding a few links (ony by one) to the mail body:

Code
-------------------

<language="Visual Basic 6.0">
objMsg.body = objMsg.body & "<file:///" & fileName & ">"

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

where fileName is holding the complete path of the file I'm referin
to.

This lead to multiple <<<< and >>>> because of the automatic formatin
thing.
Using this with

Code
-------------------

<language="Visual Basic 6.0">
objMsg.HTMLbody = objMsg.HTMLbody & "<file:///" & fileName & ">"

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

leads to nothing.

So finally to my questions

- Do I need another format of my links? I think so because the ta
<file... is not a valid html statement and therefor being ignored.
Okay this one I answered myself =)
- What exactly does using objMsg.HTMLBody to the mail? Setting i
automatically sets the Editor type to olEditorHTML, doesn't it?
- What about emails which are plain text before? Inserting the lin
using with

Code
-------------------
objMsg.HTMLBody = objMsg.HTMLBody & "<BR>" & "<a href=" & _
Chr(34) & strFileName & Chr(34) & ">" & strFileName & "</a>"

-------------------
shows the link but it won't resolve.
- Is there another solution which I keep missing?


Thank you for your input so far.

Mat
 
Ken said:
*First of all most secure versions of Outlook prevent a file lin
from being
live, so you're going to have to experiment to see if what you wan
will
work.

For files you need a syntax like this:
file://\\FileServer\OurFiles\myfile.doc

See http://www.slipstick.com/outlook/links.htm#fileshortcuts fo
more
information.*

Thank you although I couldn't find *more* information at that give
link =)

The problem I'm facing with that solution is when ever the pat
contains something like "my file.doc" (eg a space in filename o
folder) then the syntax leads to:
_file://\\FileSever\OurFiles\my_ file.doc
which is in fact a broken link.
Same goes for other characters, eg german special characters (ö) an
such.

Thats why I enclosed the link with those "<", ">" which works fin
except the problem why I opened the thread, that after multipl
inserts, outlook adds every time "<" or ">" to it.

Mat.

ps So this works: <_file://\\FileSever\OurFiles\my_file.doc_> (not
that there *is* a space between my and file)
and outlook makes something like after a few more insertions to th
email body
<<<<<_file://\\FileSever\OurFiles\my_file.doc_>>>>
 
I'm not sure about how you'd handle those things unless using HTML escape
character like %20 for space and so on would work.
 
Back
Top