I'm having some problems in GroupWise 6 which I'd appreciate some help

I'm trying to search an address book for an email address based on the
"from" name in a newly created email, where the address book name format
is "LastName, FirstName". I've tried a number of approaches, none of which
seems to work, as I shall describe below.

1. I get the displayed name in the "from" textbox of the mail by executing
ItemGetText. Now, regardless of the address book name format, the name I
receive is in the format "FirstName LastName" (eg "Dave Smith"). When I
then execute AddressBookResolveFullName on this display name, I am
returned "Token Execution Failed" presumably because the address book
lookup is expecting a name in the format "Smith, Dave" (incidentally, the
same code works fine when the address book name format is set to
"FirstName LastName").

2. As an alternative approach, I get the current UserID by executing
EnvUserId. This gives me a UserId in a format such as
dave.London.QA@mydomain.com. I then execute AddressBookGetFullName in the
expectation of being given the display name (hopefully in "LastName,
FirstName format"), which I could then use in executing
AddressBookResolveFullName. However, AddressBookGetFullName also returns
"TokenExecutionFailed". This may be due to the format of the UserID I am
using not matching what is expected by AddressBookGetFullName. I'm not
entirely clear in my mind about the different formats that can be returned
by EnvUserId, nor how the fields in the UserID map onto the format
expected by AddressBookResolveFullName.

So, Id greatly appreciated answers to the following questions:

1. Why does AddressBookResolveFullName fail when I use the name as it
appears in the "from" text box?

2. Why does the name in the "from" text box not match the name format
defined by the address book? After all, any name I enter in the "To" field
must be in the correct format.

3. Is there any way of converting a name from "FirstName LastName" to
"LastName, FirstName" other than writing code to parse the name for a
comma and switching the names myself? To have to do this seems to me like
asking for trouble.

4. Can I use the UserID returned from EnvUserId when executing

5. Will the name returned by AddressBookGetFullName be in "LastName,
FirstName" format?

6. Or am I missing a much simpler solution to this problem?!

Thanks in advance,