Outlook Command Line Parameter Changes

As part of SP3 for Outlook 2003 (and included in SP1 for Outlook 2007) we’ve made a change to the way command line parameters are parsed to ensure Outlook is always doing the right thing.  As part of this change, a less common way of attaching files to new e-mail messages through command line parameters […]

Share online:

As part of SP3 for Outlook 2003 (and included in SP1 for Outlook 2007) we’ve made a change to the way command line parameters are parsed to ensure Outlook is always doing the right thing.  As part of this change, a less common way of attaching files to new e-mail messages through command line parameters with Outlook may be broken in some solutions.

Previously, Outlook under some circumstances would handle an implicit command line parameter without a switch. For example, if a command line argument was provided without a switch, and was a path to a folder in the file system, Outlook would treat the argument with an implicit /select switch flag, displaying that folder in the Explorer window.  If the argument was a path to a file on the file system, Outlook would use an implicit /a switch and attach the file to a new message.

As part of making sure that our command line parameters were handled in a predictable manner, we removed the implicit logic in these service packs.  You must now explicitly specify the appropriate switch before the path to a folder to display or file to attach.  If a solution calls Outlook using an argument without a switch or with an invalid set of switches, the following error is displayed:

For more information on the valid command line switches that are supported by Outlook, take a look at our online documentation for command line switches.

Outlook, Debugging, Command, Parameter, Microsoft, Knowledgebase

About The Author

Deepak Gupta is a IT & Web Consultant. He is the founder and CEO of diTii.com & DIT Technologies, where he's engaged in providing Technology Consultancy, Design and Development of Desktop, Web and Mobile applications using various tools and softwares. Sign-up for the Email for daily updates. Google+ Profile.