> Is there a function for finding the boot drive from within VBA that
> will work will with Word '97 and later for Windows '98 or later?
[quoted text clipped - 5 lines]
>
> Thanks in advance,
Place the following code into a separate module
Private Declare Function GetWindowsDirectory Lib "kernel32" _
Alias "GetWindowsDirectoryA" _
(ByVal lpBuffer As String, ByVal nSize As Long) As Long
Function WindowsFolder()
Dim strWin As String
strWin = Space(256)
GetWindowsDirectory strWin, Len(strWin)
WindowsFolder = Left$(strWin, InStr(strWin, Chr$(0)))
End Function
The WindowsFolder function returns the pathname of the windows folder.

Signature
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Gary Hillerson - 11 Nov 2004 17:23 GMT
Wow! Works perfectly.
Thanks
Gary
>Place the following code into a separate module
>
[quoted text clipped - 10 lines]
>
>The WindowsFolder function returns the pathname of the windows folder.