....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.
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.
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
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)))
'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)
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
There.... Easy! ... erm... not.
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.
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?