This article was previously published under Q236519
This article has been archived. It is offered "as is" and will no longer be updated.
Moderate: Requires basic macro, coding, and interoperability skills.
With the Package and Deployment Wizard in Microsoft Office 2000 Developer Edition, you can use special keywords called Macros. These words enable you to create a shortcut path to point to components on the target computer where you want to install your application.
For example, you may want a shortcut for your application to always point to a file in the application's subdirectory. However, you may not know into what path the user may install the application. You can use the $(AppPath) macro to solve this problem because the macro enables you to ensure that the shortcut points to a file in the directory where the application is installed. When the package is installed, the $(AppPath) macro is translated into the hard-coded path of the application directory, and the resulting shortcut contains that path.
This article discusses the basic rules for using these macros, and also includes a table of what macros are available in the Package and Deployment Wizard.
Rules for Writing Command Lines in the Wizard
IMPORTANT: Be sure to place quotation marks, switches, and macros in the proper places.
Rule 1: Command Line Switches Need Proper Placement:
Usually any switches come just after the executable file, as in the following example:
However, the Package and Deployment Wizard does not require that you enter a path to the executable file. When you use a macro, the Package and Deployment Wizard determines the path when the user is installing the application. When you create a shortcut in the Package and Deployment Wizard, put switches and the path to the database in the proper location, as in the following examples.
Always run the application in run-time mode (even if the user has the full retail version of Access):
NOTE: In these examples, note that you do not enclose the switches in quotation marks. You only enclose the paths in quotation marks.
Rule 2: Enclose Each Path in Quotation Marks.
If your command line contains more than one path, such as when you specify a workgroup information file and a database name, enclose each path in quotation marks in case the path contains spaces or long file names. You cannot put quotation marks around the entire line or around more than one path. What follows is an example that is incorrect, and then an example that is correct.
The following example is incorrect because more than one path is inside one set of quotation marks: