Embedding custom links into a Word Document

There was recently a question on the MacEnterprise mailing list about embedding a clickable smb link into a Microsoft Word document, and it got me thinking - Word only sees fit to support 3 different types of URIs. Hyperlinks to other documents, links to web pages, and email addresses. But what If we want to include a link to a path in a fileshare? Whether that’s smb, afp, nfs, etc, Word does not support it. When I choose to link to a ‘web page’, Word mangles my URI to look like this:

file://localhost/smb/::fileshare.example.com

instead of the proper syntax as I typed it in (smb://fileshare.example.com)…
It assumes I meant to link to a document.

So, how to fix this? Well, it involves a bit more work than it should. First, create a html file that contains just a link to your URI:

<html>
<body>
<a href="smb://fileshare.example.com">example link</a>
</body>
</html>

Then, open up your work document and choose Insert > File. Make sure you choose to the Enable All Readable Documents in the dropdown box. Select your html file, and viola! You now have an embedded URI that does not conform to Microsoft Word’s expectations.

 
1
Kudos
 
1
Kudos

Now read this

Getting quick information about your EC2 instances…

So, something that has always sort of annoyed me - getting IP addresses and other specific information about your EC2 instances has always been a bit clunky. Obviously, there is the awscli, but it isn’t exactly the easiest place to get... Continue →