Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / July 2005

Tip: Looking for answers? Try searching our database.

How to use %systemdrive% and %username%

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
henpat - 21 Jul 2005 13:22 GMT
Hello all
(In Word 2003)
I need to call with my shell command to explorer.exe, it works
   shell "explorer.exe" or shell "explorer.exe c:\Data"
But I need use the variables %systemdrive% and %username% and an error
message appears: "this file doesn't exist".
How can I use the variables with shell or whitout it?
Thanks in advanced.

Henpat
Christian Freßdorf - 21 Jul 2005 13:28 GMT
Hi,

use the environ-function:

Environ("systemdrive")
Environ("username")

Signature

regards Christian
~~~~~~~~~~~~~~~~
reply only to this newsgroup
http://www.mvps.org/word/FindHelp/Posting.htm
http://support.microsoft.com/default.aspx?scid=fh;DE;NGNetikette

henpat - 21 Jul 2005 14:29 GMT
Thanks it worked.
Henpat

> Hi,
>
> use the environ-function:
>
> Environ("systemdrive")
> Environ("username")
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.