[Use your browser's BACK button to return to the PRIME FAQ Page or click here if you came directly to this page.]
We wrote this FAQ to answer the many questions we receive on this topic from our clients and other inquiring minds in the many electronic communities we frequent.
Q: I'm trying to install a Word 2000 add-in application I've written. How do I determine the folder where Word is storing user templates and where the Startup folder is located?
A: This is a problem that faces anyone who is trying to automate the installation of Word, Excel, or PowerPoint templates and add-ins. We use Wise Solution's InstallMaster to create the automated installer that handles our PRIME utilities for Word and Excel and had to be able to determine where Office applications are looking for key folders. The answer lies with the Registry.
To get the location of Word 2000's Startup folder on the user's local machine, you can find the path of Word 2000's Startup folder in the registry using the following registry key:
HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Word\Options
The STARTUP-PATH value under this key will contain the path information Word uses to find the Startup folder. You need to always start by checking this registry value instead of relying upon the default Application Data location since the user can change the Startup folder location via the Word interface, Tools / Options / File Locations.
Be sure to test that the path found actually exists on the user's local machine. If the path does not exist, retrieve the Application Data folder's path from the registry. This is found under the following registry key:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
The AppData value holds the path to the Application Data folder. Create the Startup folder for Word by appending \Microsoft\Word\Startup to the AppData path.
To get the location of Office 2000's common Templates folder on the user's local machine, do the following (note that Word shares its Templates folder with all of the other Office 2000 applications).
Get the Office 2000 User Templates folder path from the registry using the following registry key:
HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Common\General
The UserTemplates value will contain the path. However, you must again test to see if the path does actually exist on the user's local machine. If it doesn't, create the UserTemplates folder by appending \Microsoft\Templates to the Application Data path we just discussed.
The steps to get Office 2000's common Workgroup Templates folder are basically the same. Use this registry key to grab the Workgroup Templates folder path:
HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Common\General
Check the SharedTemplates value for the path. Test to see the path exists on the user's local machine and if it does not you create it as we did in the last example by appending \Microsoft\Templates to the Application Data path.
PRIME Consulting Group, Inc. (info@PRIMEConsulting.com) does custom Microsoft Office 2000 add-in installers and provides the following services:
|