The information in this article applies to:
SUMMARYThe Microsoft Windows operating system provides two routines that can be called by Microsoft Office 2000 programs to get the \Windows and the \Windows\System folders. MORE INFORMATIONMicrosoft provides programming examples for illustration only, without
warranty either expressed or implied, including, but not limited to, the
implied warranties of merchantability and/or fitness for a particular
purpose. This article assumes that you are familiar with the programming
language being demonstrated and the tools used to create and debug
procedures. Microsoft Support professionals can help explain the functionality
of a particular procedure, but they will not modify these examples to
provide added functionality or construct procedures to meet your specific
needs. If you have limited programming experience, you may want to contact
the Microsoft fee-based consulting line at (800) 936-5200. For more
information about the support options available from Microsoft, please see
the following page on the World Wide Web: http://www.microsoft.com/support/supportnet/overview/overview.aspWhen Windows starts, it sets a special environment variable called WINDIR with the path from which Windows was started. You can use the following macro instruction to post the Windows folder to a message box. However, there is no argument to return the \System folder when using this method. The following examples use Windows API calls to return both the \Windows and \Windows\System folders. The following macro example retrieves the \Windows and \Windows\System folders and prints them to the Debug (Immediate) window in the Visual Basic for Applications Editor.
Create a macro and place the following code into the routine.
If the Debug window is not visible, then while in the Visual Basic for
Applications Editor, on the View menu, click Immediate Window (or Debug
Window).
Additional query words: OFF2000 off2k vb vba vbe
Keywords : kbdta EPUCon |
Last Reviewed: November 13, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |