Wow! That is a very cool piece of code! It does almost what I want, but it is returning "smithj" (which if you type "SET" in DOS is the system variable UNAM) wheras what I want is "John Smith", which is the system variable FNAM. This code must be very close to what I need, but I don't know how to modify it. Incidentally, we are networked on Windows 95, soon to be upgraded to 2000.
Thanks for your help so far,
Phil