Thursday, February 18, 2010

[UPDATED] Lotus Notes/FX 8.5.1 to Lotus Word Pro field exchange failure -- solved!

Last year I asked for assistance from the Lotus Notes community, on behalf of a client, relating to Notes/FX failure to exchange field data with Lotus Word Pro documents, see: http://notestoneunturned.blogspot.com/2009/08/does-notesfx-work-properly-with-lotus.html

Notes/FX – where “FX” represents “Field Exchange” -- is not something that many Notes users know about. It’s a nifty implementation of Windows OLE and you can read about it by searching for “Notes/FX” in the Domino Designer help database.

My client had been using it since the mid-1990s to send Notes document field data to Lotus Word Pro template documents and then print them for mailing off to their customers.

Notes/FX to Word Pro field exchange worked efficiently and unobtrusively all these years, until the customer decided to upgrade from Notes/Domino 6.5 to the exciting 8.5.1 release. He found during testing that everything except the Notes/FX field exchange worked seamlessly.

The field exchange simply would not operate. The Word Pro templates opened with their “click here” fields blank, instead of receiving data passed via OLE from the corresponding fields in the parent Notes document.

I did fiddle around with Windows registry settings, as suggested by respondents to my blog post, but didn’t seem to get anywhere. In the meantime, I started investigating other possible Notes to word processing document data transfer solutions.

These included Notes to OpenOffice, and after that (once Notes 8.5.1 was officially released towards the end of 2009) Notes to Lotus Symphony via the new LotusScript API. In short, these were fine for field exchange in one or two cases, but required quite a few lines of LotusScript to emulate what notes/FX was doing.

Particularly burdensome and worrying was the need to do hard-coding of field names (lots and lots of them). Of course, hard-coding of field names is quite satisfactory in a simple demonstration application which typically has only five or ten example fields (customer name, address, phone number, etc). But it’s intolerable for a production database like my client’s, which uses more than twenty such document templates, with some of them having dozens of fields to be exchanged.

As I said, I had originally fiddled with Windows registry settings and gotten nowhere back then. But for some reason, this morning I decided to have another quick go at it before giving up entirely on Notes/FX and starting into a very long haul with LotusScript and the Lotus Symphony API.

So I fired up the Windows registry editor (regedit.exe) and made the following change to the hive key (as highlighted in green):

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Notes.Link\Shell\Open\Command

TIP - a quick way to get to the Notes.Link section of the registry is to do a registry search on “Notes.Link” -- and you’ll need to hit F3 (Find Next) several times until you get there:image

And this is where you should finish up (click to view a larger image):

Lotus_NotesFX_word_pro_registry_fix_for_Notes_851

Highlighted in green is the hive key, and in pink is the command setting for Lotus Word Pro in Notes 8.5.1 (and for all I know this might apply right back to Notes 8.0), as highlighted in pink:

"C:\Notes851\notes.exe" -defini "%1"

The fix is very simple, in my case just the removal of all four double-quotes, finishing up (as highlighted in yellow) with:

C:\Notes851\notes.exe -defini %1

Once this simple Windows registry change was accomplished, the Notes/FX OLE data exchange from Notes fields to Word Pro fields worked properly again, what a relief!

HOWEVER… As is often the case, there’s a catch that makes this turn out not to be a universal solution. It will not succeed for most Notes 8 installations, which typically would be something like this:

"C:\Program Files\IBM\Lotus\Notes\notes.exe" -defini "%1"

And now you’re asking why this is so, aren’t you? Purely by empirical testing I discovered that you cannot have blanks in any of the folder names -- as between “Program” and “Files” (curse you again for this, Microsoft).

The presence of spaces is probably the reason for the double quotes being placed in the hive key for the Notes.Link registry entry, but apparently IBM has slipped up somehow in going from Notes 7 to Notes 8. It should be a very simple fix, and I hope they do it soon (Notes 8.5.2 would be nice).

In summary, if you’re one of the few Notes sites still using Notes/FX, you’ll need to install Notes 8 in a folder hierarchy that doesn’t contain any blanks, and also carry out the above simple registry change (which could be automated by scripting, I suppose).

Well, at long last I have a solution for my long-suffering client. Arrived at by chance or my twisted thinking and persistence perhaps, all the same I reckon that it’s a satisfactory workaround and some of you should be able to make use of it too.

Keep an eye on this post in case there are any corrections or updates after I liaise with IBM Support.

UPDATE #1 [19 February 2010]
Initial feedback from IBM Support was as follows:

Cause
----------------------------------------------------------------------
This parameter is used to prevent malicious URLs to launch Notes via  Windows registry by having an "=\\evilhost\notes.ini" on the command line.
----------------------------------------------------------------------
 
/defini %1 is used to provide an alternative Notes.ini file. If you replace this parameter you should not loose functionality.
 
"-defini %1" seems to be the best way to use this parameter. There has been issues using "/defini" as third party software like SmartSuite had troubles parsing this string.
----------------------------------------------------------------------

Aha, it’s the old “blame third party software” caper! Rather amusing, since in this case the third party is the same as the first party, so it’s the right hand smacking the left hand! Anyway, I’m not quite sure what will happen next. Will they (the Lotus SmartSuite team via IBM Support) get back to me with further advice as to what I should do for my client? Will they provide a fix so that this parameter parsing trouble gets resolved and Notes/FX works properly again for Lotus Word Pro? … Time will tell.

UPDATE #2 [22 February 2010]
My client has confirmed that the registry change works. He is able to use all his Notes/FX to Lotus Word Pro links, and is at last able to forge ahead with his delayed Notes Client 8.5.1 installation.

He decided to install Notes 8.5.1 in the C:\Lotus\Notes directory (remember, the golden rule is to avoid any spaces in the path string).

I provided him with a .reg file so that he doesn’t have to manually edit the Windows registry, the contents of which are as follows. In case of word wrap in this post, note that there are four lines, the second line being blank.

REGEDIT4

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Notes.link\Shell\open\command]
@="C:\\Lotus\\Notes\\notes.exe -defini %1"

Save these lines with a file name such as NotesLink_command_adjust.reg and just double-click to apply the registry fix. Naturally, if you use some other folder than in this example, amend the fourth line being careful to use double backslashes for each single backslash in the path string. (Read more about such files at http://support.microsoft.com/kb/310516)

7 comments:

  1. "C:\Program Files\IBM\Lotus\Notes\notes.exe" -defini %1 does not work?
    I ask because for the -sa (Basic Notes Client) I put the path in brackets but leave the parameters outside of it like
    "C:\Program Files (x86)\IBM\Lotus\Notes\notes.exe" -sa

    ReplyDelete
  2. Hello Henning!
    I think it might be failing because you've got Notes installed by default under the "Program Files" folder. So it MIGHT work (according to my empirical results) if you uninstall Notes and re-install in, say, C:\IBM\Lotus\Notes\ which would eliminate the need for double-quotes in the registry setting, and it becomes:
    C:\IBM\Lotus\Notes\notes.exe -defini %1

    Please tell me if that works for you. I only tested the Standard client, but it probably will work with the Basic client too.

    ReplyDelete
  3. Hi

    we are using Lotus client 8.5, how can i disable screen capture option on tool menu

    please send mail to babu@veeras.com

    ReplyDelete
  4. I cannot find a "screen capture" option on the Lotus Notes "Tools" menu. Perhaps you're seeing an option outside Lotus Notes itself? Do you have any screen capture programs installed, such as Techsmith's SnagIt or equivalent? It doesn't on the surface seem to be a Lotus Notes issue.

    ReplyDelete
  5. Michael Niermann sent me the following advice via e-mail ...

    You can always avoid the space in the filepath by using the DOS compatibility syntax, e.g. "Progra~1" (or maybe 2 if you have duplicates or renamed it).

    Danke schoen, Michael.

    ReplyDelete
  6. As i go through your post, which seems to be really excellent. Keep updating more and more.

    ReplyDelete
  7. I definitely impressed for every little bit of it in this post. keep up your work done..

    ReplyDelete