L
Lee
Hi. Thanks for your reply, however, I'm not sure exactly
what you are saying. I understand that the username on
your example is "administrator" but how would I get that
by using code? I'm new to this VBA stuff...
The normal template is saved in each staff members
personal drive (P:\). The personal drives are named
\\alchemy\private\(username) but I am unsure how to get
that username...
I appreciate your help.. Thanks
what you are saying. I understand that the username on
your example is "administrator" but how would I get that
by using code? I'm new to this VBA stuff...
The normal template is saved in each staff members
personal drive (P:\). The personal drives are named
\\alchemy\private\(username) but I am unsure how to get
that username...
I appreciate your help.. Thanks
..-----Original Message-----
There are some very involved ways to derive the username.
However, the easiest way is to parse it from where the
normal template is stored. The following will give you
the bona fide username, not something that was a shortcut
in Word itself (unless the normal template was re- directed
to a non-default folder).
strPath = Application.NormalTemplate.Path
So, on my computer, this is what it provides:
C:\Documents and Settings\Administrator\Application
Data\Microsoft\Templates
So, you can parse what's between documents and settings\
and \applcation data.
Hope this helps.
dz
-
.