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

ext_conf and its uses with omnibus!

So I’ve mentioned in the past that I was struggling to integrate kitchen-cabinet with omnibus tools like chef (or chefdk). My old solution was to do this: def self.chef_check if File.exist?('/opt/chef') ENV['GEM_HOME'] =... Continue →