Retreiving Desktop Folder in Word

I am trying to declare the following function so that i can eventually retreive the path to the current user's desktop on a Win2000 machine.

Public Declare Function GetSpecialFolderLocation Lib "Shell32" (ByVal hwndOwner As Long, ByVal nFolder As SpecialFolderIDs, ByRef pIdl As Long) As Long

However, when I try to copile the code, I get a message "User-Defined type not defined". I am assuming that I need to create a reference to a library in order for these functions to work. Does anyone know the library I need to reference within Word?

Thanks in advance.



Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion