7

When I type a URL into an email in Outlook, it automatically converts it to a hyperlink. I can, of course, remove the hyperlink from the context menu:

Outlook context menu screenshot

But, then when the email is received and when I view it in my Sent Items folder, the urls are again converted to hyperlinks. How can I prevent this? Embedded images are no good because the URL must be copy and pasteable (among numerous other reasons that this approach is not great). And it must retain the formatting applied when I send it.

This answer on stackoverflow shows a good trick for preventing auto linked urls when sending an email programmatically, but I'm looking for a way to do this from the UI. Perhaps there a way to edit the HTML of the message before it is sent?

If not, I guess I'm off to write an Outlook Add-in.

6
  • You can edit the HTML of the link before you send it. Just click the Edit Hyperlink... showed in your image there and then add the <z></z> tag within the hyperlink, as outlined in the SO answer you showed.
    – techturtle
    Sep 14, 2012 at 21:17
  • @techturtle - Well, that's certainly better. It's still shows a hand cursor indicating the link is clickable. It also shows a tooltip saying "click to follow link" and exposing the faux html tag in the url. But it keeps the formatting I specified, and clicking on it does nothing. Thanks for the tip.
    – gilly3
    Sep 14, 2012 at 21:27
  • True. I added this as an answer so I could explain it a little better and so you could accept as answer if this what you end up going with.
    – techturtle
    Sep 14, 2012 at 21:31
  • One comment on the OP: Why do you sent an email in HTML? I know some clients support this but not all receivers will be able to read your mail. And not using HTML but 'normal' email will at least make sure that you do not send it as a hyperlink.
    – Hennes
    Sep 14, 2012 at 23:24
  • @Hennes - Two points: 1.) Have your really found HTML email incompatibility to be a problem? Which email clients today cannot display HTML formatted email? In my decades of emailing, I've not once heard from a recipient that they were unable to read my HTML formatted email. 2.) My email client automatically converts urls in plain text email messages to hyperlinks.
    – gilly3
    Sep 15, 2012 at 0:06

3 Answers 3

1

You can edit the HTML of the link before you send it. Just click the Edit Hyperlink... showed in your image there and then add the <z></z> tag within the hyperlink, as outlined in the SO answer you showed.

Edit Hyperlinks

This has the advantage of showing up like a link, but attempting to click it does nothing. However, you are not prevented from selecting it to copy/paste.

Dummy link

The z isn't necessary; any invalid HTML tag will do. You could replace the whole link with something invalid, but then it would still try to open it in a browser. For some reason, having the invalid tag in the middle prevents it from even trying to open it even though it still knows it's a hyperlink.

2
  • Thank you. I can actually improve on this a little. Just replace the entire address with a faux tag, such as <Do not click>, or <->, or < > (with a space). The tool tip displayed removes the outer angle brackets, displaying just "Do not click", "-", or " " respectively. Change the formatting and you are set! i.stack.imgur.com/jvvbj.png
    – gilly3
    Sep 15, 2012 at 0:38
  • Interesting. When I tested it earlier, I just put a as the hyperlink, but it tried to take me to http://a/. It failed, obviously, but I didn't that was what you wanted. Glad you found that out though. Could definitely come in handy.
    – techturtle
    Sep 15, 2012 at 3:35
5

You can't prevent this (without somehow breaking the URL), because it's the recipient's client that displays the URL as a clickable link.

1
  • Exactly, I just tried this. The received html has no <a href, but Outlook displays that as a link. Hey, even a plan text email is displayed like that.
    – Andrew
    Apr 17, 2020 at 19:30
1

I've found that inserting a zero-width space in the URL works pretty well. For example, after the slashes and dots.

It prevents e-mail clients from formatting the text as links, but leaves the text copyable. See the difference:

It can be entered in Unicode as U+200B. For example on Ubuntu you can hit ctrl+shift+u then type 200b and space to enter it anywhere.

At first I thought this would break eventually, namely after pasting into the browser. But in Chromium the pasted link worked just fine (although the link was broken when the ZWSP was anywhere inside the http://). Even pasting a directory to Bash worked. Both the browser and the shell just ignored these zero-width characters.

Beware, that it probably will break something. For example, if pasted into a source code editor – you could end up with nasty bugs in your programs.

1
  • It didn't work for me. After pasting your second url, it was converted as a link, I manually removed it, sent it, and the email I received it was showed as url, even though it has the zero width space (verified both in the rendered email and its source code).
    – Andrew
    Apr 17, 2020 at 19:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .