Including Windows User Name in Macro?

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Paul Moloney (paul_moloney_at_hotmail.com)
Date: 05/31/04


Date: Mon, 31 May 2004 11:15:50 +0100

I have a macro which at the moment uses a hardcoded value for
a particular directory:

WorkingDir = "C:\Documents and Settings\pmoloney\Desktop\Acrobat\in\"

I'd like to change this so that it uses the Acrobat\in directory on the
current user's desktop; that is:

WorkingDir = "C:\Documents and Settings\{current_user}\Desktop\Acrobat\in\"

How is this done in Word VBA?

Thanks,

P.