Skip to main content

The Notes UI and Sending a Link to a File

Yesterday I found myself explaining to a new but technical user that Notes/Domino is, like Blackberry. An amazingly powerful and capable piece of software capable of everything that the competition is capable of - plus a whole lot more.

....and hampered by what is still one of the worst user interfaces in the world.

Sorry Notes UI team - I know you're doing your best. The same goes for the blackberry team. I know that they're doing their best too. It's just that the user interfaces have so far yet to go.


So, this morning, the same user asks me how to send a link to a file on our common drives without sending the attachment everywhere.

He's already cleverly tried attaching the .LNK file, but our policies don't allow that as it's considered to be an executable file.

I said to him that I didn't actually know. 18+ years of using the product and I still really don't know how to do this. I know several workarounds but I don't know of any one all-encompassing method.

It's sad.

Even sadder is the fact that as I received the call I was clicking the SEND button on a PDF I was sending around in the required manner.

How did I do it?

I added a button into my mail and dumped a chunk of code which uses the windows ShellExecute API call into the lotusscript section.

I looked around the notes client to see if there was a new way (like that wonderful new way of adding web links). Nope... I couldn't see anything.

I tried Create as hotspot... it spat the dummy about spaces in the file path.

I enclosed in quotes and tried again... this time it almost worked. I changed the beginning of the path to "file://" and it worked - but of course I know that some browsers won't accept file:// urls for security reasons.

I'm none the wiser.

I did a web search and found the following;

A set of instructions...

Nope... I'm not telling my users to do that. It's too hard and I'd rather tell them that they can't do it. Try again.

An External Application

You're kidding right? I mean, kudos to the guys who found an empty market niche but there's no way I'm going to accept that we need to install a third party app for this. It should be built in. In any case, the application does a sort of manual DAOS (Domino attachment and object service). It still stores the attachment in a second place - inside a database in the notes/domino system.


My Code
I guess I should make my button code available for everyone - well, everyone who has a designer client - so, not the majority of my users...

1. Add a button.
2. Change it to Run on Client - LotusScript
3. In the declarations section put this code...

Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (Byval hwnd As Long, Byval lpOperation As String, Byval lpFile As String, Byval lpParameters As String, Byval lpDirectory As String, Byval nShowCmd As Long) As Long

Declare Function GetDesktopWindow Lib "user32" () As Long

'CONSTANTS
Const SW_SHOWNORMAL = 1
Const SW_SHOWMAXIMIZED = 3
Const SW_SHOWDEFAULT = 10

4. Create a new subroutine as follows;

Sub RunShellExecute(sTopic As String, sFile As Variant, sParams As Variant, sDirectory As Variant, nShowCmd As Long)
'EXAMPLE: Play wav file with associated app RunShellExecute "Play", "c:\windows\media\Notify.wav", 0&, 0&, SW_SHOWNORMAL
'EXAMPLE: Play avi file with associated app RunShellExecute "Play", "E:\VB Graphics\avi\Cogs.avi", 0&, 0&, SW_SHOWNORMAL
'EXAMPLE: Open txt file with associated app RunShellExecute "Open", "c:\My Documents\rundll.txt", 0&, 0&, SW_SHOWNORMAL
'EXAMPLE: Open txt file with notepad RunShellExecute "Play", "C:\windows\notepad.exe", "c:\My Documents\rundll.txt", 0&, SW_SHOWNORMAL
Dim hWndDesk As Long
Dim success As Long
Const SE_ERR_NOASSOC = &H31
Const vbTextCompare = 1
Dim HashPos As Integer
HashPos = Instr(1, sFile, "##" , vbTextCompare)
If HashPos > 0 Then
sTopic = Left(sFile, HashPos -1 )
sFile = Right(sFile, (Len(sFile) - (HashPos+1)))
End If
'The desktop will be the default for error messages
hWndDesk = GetDesktopWindow()
Print "RunShellExecute: " + "Topic=[" + sTopic + "]" + " File=[" + sFile + "]"
'Execute the passed operation
success = ShellExecute(hWndDesk, sTopic, sFile, sParams, sDirectory, nShowCmd)
End Sub

5. Write the click routine as follows; (with the LaunchPath pointing to your file).

Sub Click(Source As Button)
Const LaunchPath = "L:\Videos\IT\Hacking Fraud Example.avi"
RunShellExecute "Open", LaunchPath, 0&, 0&, SW_SHOWNORMAL
End Sub


There.... Easy! ... erm... not.


DAOS
The new Domino attachment and object service helps a lot in this regard. It only stores the attachment once - and without any user-intervention. It's almost a solution but not quite.

You see, in this day and age, we often want to make video and audio recordings of our conferences available to our internal staff without having to store even a single copy on our mail server. After all, sometimes these recordings are several gigabytes because the conferences can last for days.

Sometimes we just want to point people to a particular folder and not to file.


No Answer?
Well, that's it from me. I've been using Notes/Domino for longer than I was at school and yet I still don't know an easy way to send a link to a file.

Has anyone out there got any ideas?

Comments

Brownie said…
Do you use Quickr? If so you can send a link to an attachment stored in quickr by drag and drop. Or when a user emails an attachment the Quickr Connector can ask if they want to file it into a quickr and then send a link only.
Michelle said…
What version of Notes are you using? With Notes 8.5.1 (possibly earlier) you can use the Link button in the toolbar and just paste the file path into the dialog box. Mapped paths work (G:\Shared\My Folder\mydocumnt.docx). If you want to use a UNC path, prepend the FILE protocol (file:\\myserver\
share\folder\doc). Works on both Windows XP and Windows 7 - haven't tried it on Linux or Mac.

For older version of notes, create a link hotspot with with the file: protocol and full UNC path. Better yet - create a database to store attachments and send Notes doclinks.
Chris Toohey said…
Hey Gavin,

Since you're not adverse to using code to solve the problem, what about leveraging a Microsoft Web Browser Embedded Object Control?

I wrote a proof of concept a while back called "Sorting Hat" (http://www.dominoguru.com/pages/sortinghat_v0.1.html).

Demos here: http://www.dominoguru.com/pages/sortinghat_demo.html

The idea is pretty simple: you define the OS directory as part of the NotesDocument (via a NotesItem). You then wire the control to the NotesItem, and now you have an embedded mini-Windows Explorer.

Just a thought!

-Chris
http://www.dominoguru.com
Albert Buendia said…
Hi Gavin,

Only as a suggestion. Using the hiperlink button of the toolbar it seems it works fine.

1) Write some words, i.e. "Link to the file"
2) Select the text and click onto the hyperlink button.
3) Paste the file link directly, i.e. h:/docs/file.doc (use the "right" slash not the backslash)
4) Send to te right person.

Tested on Notes 8.5.1

Hope it can help you.
Anonymous said…
Let me lead with I hate lotus notes more than any other software I have ever used.

Here is the built-in solution and I verified it works. Create a hyperlink and instead of URL use: file://///server/share/path to folder/

My need was to send a link to a folder and not a file.

http://www-01.ibm.com/support/docview.wss?uid=swg21498510
Gavin Bollard said…
Anonymous,

The file:// solution works well and it's my go-to method of choice. I'd like an easier method for my users but clearly that's not going to happen - and since the days of Windows seem to be declining, it may no longer be a problem in the future.

I understand that many people hate Notes. I love it and I use it for many things, mail being the very LEAST of these.

The future of Notes is web but sadly most domino apps I've seen aren't designed for the web, just tweaked for it. Domino is still the most powerful and versatile end-user system I've ever seen.

It's just a pity that the current people at IBM lack the vision to see the clear path ahead.

Popular posts from this blog

How to Change Your Notification Options for New Lotus Notes Mail in version 8.x

Don't worry, I'm not patronizing you (my readers), I just decided to re-document this for one of our internal users and thought you might want to be able to use it in your own user documentation. WHAT IS THIS DOCUMENT ABOUT? Some people who don't get a lot of mail, like to be notified when such an event occurs. Notification can be; via a sound via a pop-up box via the system tray (where the computer clock is) The pop up box looks like this; Other people, who like myself, get too much mail would rather not be notified. The aim of this document is to tell you how (and where) to turn these options on and off. CHANGING YOUR SETTINGS To change your settings from the Notes 8.x client; On the Menu, click File , then Preferences... On the left hand side , click on the little plus sign to the left of Mail to expand the options. Click on the option marked Sending and Receiving . In the middle section, under receiving, you can control your notifications. If you untick the box mark...

How to Create a Bootable DVD Using Nero Burning ROM 9

I often need to create bootable CDs and DVDs but it's weird because I frequently end up buring myself a new coaster instead. It's not that the process is difficult, just that nero has a few too many options and I forget which ones to choose and end up picking the wrong one. I figured that the best way to avoid this mistake in future would be to write the steps down. Procedure Insert CD or DVD into your DVD Burner. Start Nero Burning ROM 9 Choose DVD-ROM (Boot) or CD-ROM (Boot) depending on what you're creating You'll be prompted for a disk image source. Choose a Nero Source - you'll usually find them somewhere like this... C:\Program Files\Nero\Nero9\Nero Burning Rom\DOSBootImage.ima Leave the Boot Locale as English - unless you really need a different keyboard layout Tick the box marked [X] Enable Expert Settings Choose Hard Drive Emulation and leave any other settings as they are. Click the button marked New Add any files you want but don't try to add operati...

How to Create an Auto-Response Mail Message in Lotus Notes 8.5.3+

Why would you do this? Suppose that you have an externally accessible generic email address for your company; support@mycompany.com or info@mycompany.com. You might expose this to the web and allow people to send messages to you. Setting up an auto-response email will tell the senders that their message reached its destination and that it will be dealt with accordingly.  It's also good practice to include links to FAQs or other useful information. Why 8.5.3 The techniques we'll be using here work in older versions of Notes but some of the options seem to have moved around in 8.5.3.  I figured it was a good time to show you where they've moved to. The Procedure Start Domino Designer and open the Mail file to be modified.  A really quick way to do this is to right-click on the application tab and choose "Open in Designer". In the Left hand panel of designer, expand Code and then double-click Agents.  A new window should appear. Click the action ...