Showing posts with label Windows Script. Show all posts
Showing posts with label Windows Script. Show all posts

Saturday, April 11, 2009

Use WShell to Retreive the Path to Windows Special Folders

Sometimes in your program you'll need to find the path of the user's MyDocuments folder, or to the Desktop, or to the Favorites folder. Because different versions of Windows will place these folders in different places, it's important to ask Windows for the location of the file, instead of hard coding it or figuring it out from the user name.

This post describes a method for using the Windows Script Host to retrieve these names. The Microsoft documentation is here: SpecialFolders Property.

Here's an example of how to build a VBA function that uses this method within MS Access to find the path to the user's MyDocuments folder.

Thursday, January 3, 2008

Automating Access Using Windows Script

I keep meaning to really learn to use Windows Script. It looks like a great addition to my toolkit. I stumbled across this article on Helen Feddema's Access Archon page. It looks like it gives a really detailed walkthrough of a sophisticated Windows Script solution.