Glaswegian
02-19-2010, 06:00 AM
Hi
I'm looking at e-mailing from Excel using Lotus Notes (I know, but I have to work with what I've got) and have one problem.
The code for Notes includes a line to parse the username to find the Notes Database name. However, the username does not appear correctly. The original line of code is
username = session.username
MailDbName = Left$(username, 1) & Right$(username, (Len(username) - InStr(1, username, " "))) & ".nsf"
Stepping through the code shows that the username starts as
CN=John Smith/OU=AB/O=XYZ_EUROPE
The actual username within Notes should be
John Smith/AB/XYZ_EUROPE
and this is what I need to identify the user database.
I'm not much good at formulae so I'd be grateful if anyone could suggest the changes required to end up with the correct username.
Thanks.
I'm looking at e-mailing from Excel using Lotus Notes (I know, but I have to work with what I've got) and have one problem.
The code for Notes includes a line to parse the username to find the Notes Database name. However, the username does not appear correctly. The original line of code is
username = session.username
MailDbName = Left$(username, 1) & Right$(username, (Len(username) - InStr(1, username, " "))) & ".nsf"
Stepping through the code shows that the username starts as
CN=John Smith/OU=AB/O=XYZ_EUROPE
The actual username within Notes should be
John Smith/AB/XYZ_EUROPE
and this is what I need to identify the user database.
I'm not much good at formulae so I'd be grateful if anyone could suggest the changes required to end up with the correct username.
Thanks.