Search This Blog

Thursday, October 9, 2008

Office 2003 command line switches

How to use command line switches-->
Outlook 2003 comes with lots of new command line switches which can be very handy for troubleshooting. The following list is from the Outlook 2003 help file.
To use the switches follow these instructions:
Search for the Microsoft Outlook executable file, Outlook.exe, and make a note of the path to Outlook.exe. For example, by default the path for Outlook 2003 is;C:\Program Files\Microsoft Office\Office11\Outlook.exe.
Click Start, and then click Run.
In the Open box, type the complete path you noted in step 1, including the file name. Press the SPACEBAR once, and then type a forward slash mark (/) followed by the switch.For example, if you want to use the CleanReminders switch, the command you type in the Open box should look like this:"C:\Program Files\Microsoft Office\Office11\Outlook.exe" /CleanremindersNote: Paths that include spaces between words must be enclosed in quotation marks (”) and are case sensitive.
To run the command, click OK.
You can also create a shortcut which includes one or more switches so you can automate tasks or start Outlook in a certain folder like the Calendar
Click the Start button, and then click Search to find the Outlook executable file, Outlook.exe. For example, by default the path for Outlook 2003 is;C:\Program Files\Microsoft Office\Office11\Outlook.exe.
Right-click Outlook.exe, and then on the shortcut menu point to Send To, and then click Desktop (create shortcut).
Close the Search Results dialog box, and then go to the desktop.
Right-click the shortcut you just created, and from the shortcut menu click Properties.
On the Shortcut tab, locate the Target box. It contains the path for Outlook.exe.
Press the SPACEBAR once to type a space after the path, and then type /select outlook:calendar
Click OK.
On the desktop, double-click the Outlook shortcut you created.
To create a shortcut that creates a new message follow the above instructions but instead of typing /select outlook:calendar use /c ipm.note. You can also drag & drop this shortcut to your Quick Launch toolbar on the Taskbar so you can easily create a new message without going to Outlook first.
Creates an item with the specified file as an attachment.Example:"C:\Program Files\Microsoft Office\Office11\Outlook.exe" /a "C:\My Documents\labels.doc"If no item type is specified, IPM.Note is assumed. Cannot be used with message classes that aren’t based on Outlook.

/altvba otmfilename
Opens the VBA program specified in otmfilename, rather than %appdata%\Microsoft\Outlook\VbaProject.OTM.

/autorun macroname
Opens Outlook and immediately runs the macro specified in macroname.

/c messageclass
Creates a new item of the specified message class (Outlook forms or any other valid MAPI form).Examples:

/c ipm.activity
creates a Journal entry
/c ipm.appointment
creates an appointment
creates a contact
/c ipm.note
creates an e-mail message
/c ipm.stickynote
creates a note
/c ipm.task
creates a task
Prompts for the default manager of e-mail, news, and contacts.
Starts Outlook and deletes client-based rules.
Deletes the logging records saved when a manager or a delegate declines a meeting.
Removes Search Folders from the Microsoft Exchange server store.
Clears and regenerates free/busy information. This switch can only be used when you are able to connect to your Microsoft Exchange server.
Removes invalid profile keys and recreates default registry keys where applicable.
Launches Outlook with a clean Personal Folders file (.pst)
Clears and regenerates reminders.
Starts Outlook and deletes client- and server-based rules.
Deletes all Schedule+ data (free/busy, permissions, and .cal file) from the server and enables the free/busy information from the Outlook Calendar to be used and viewed by all Schedule+ 1.0 users.
Starts Outlook and deletes server-based rules.
Deletes duplicate reminder messages.
Deletes the subscription messages and properties for subscription features.
Restores default views. All custom views you created are lost.
Starts Outlook without figuring out if Outlook should be the default client in the first run.
Opens the specified message file (.msg) as an OLE embedding. Also used without command-line parameters for standard OLE co-create.
Opens the new window in “explorer” mode (link bar on).
/f msgfilename
Opens the specified message file (.msg) or Microsoft Office saved search (.oss).
Starts Outlook as if it were run for the first time.
Opens a new window in “folder” mode (Navigation Pane off).
/hol holfilename
Opens the specified .hol file.
/ical icsfilename
Opens the specified .ics file.
/importprf prffilename
Launches Outlook and opens/imports the defined MAPI profile (*.prf). If Outlook is already open, queues the profile to be imported on the next clean launch.
/l olkfilename
Opens the specified .olk file.
/launchtraininghelp assetid
Opens a Help window with the Help topic specified in assetid.
/m emailname
Provides a way for the user to add an e-mail name to the item. Only works in conjunction with the /c command-line parameter.Example:Outlook.exe /c ipm.note /m emailname
Starts Outlook without loading outcmd.dat (customized toolbars) and *.fav file.
Starts Outlook with extensions turned off, but listed in the Add-In Manager.
Starts Outlook without checking mail at startup.
Starts Outlook with the Reading Pane off and removes the option from the View menu.
/p msgfilename
Prints the specified message (.msg). Does not work with HTML.
/profile profilename
Loads the specified profile. If your profile name contains a space, enclose the profile name in quotation marks (”).
Opens the Choose Profile dialog box regardless of the Options setting on the Tools menu.
Starts Outlook using an existing Outlook window, if one exists. Used in combination with /explorer or /folder.
Resets default folder names (such as Inbox or Sent Items) to default names in the current Office user interface language.For example, if you first connect to your mailbox Outlook using a Russian user interface, the Russian default folder names cannot be renamed. To change the default folder names to another language such as Japanese or English, you can use this switch to reset the default folder names after changing the user interface language or installing a different language version of Outlook.
Restores missing folders for the default delivery location.
Clears and regenerates the Navigation Pane for the current profile.
Opens Outlook and displays the remote procedure call (RPC) connection status dialog.
/s filename
Loads the specified shortcuts file (.fav).
Starts Outlook without extensions, Reading Pane, or toolbar customization.
Starts Outlook with the Reading Pane off.
Starts Outlook without checking mail at startup.
Starts Outlook with extensions turned off, but listed in the Add-In Manager.
Starts Outlook without loading Outcmd.dat (customized toolbars) and *.fav file.
/select foldername
Starts Outlook and opens the specified folder in a new window. For example, to open Outlook and display the default calendar use: “c:\Program Files\Microsoft Office\Office11\Outlook.exe” /select outlook:calendar
Starts Outlook and forces a detection of new meeting requests in the Inbox, and then adds them to the calendar.
/t oftfilename
Opens the specified .oft file.
/v vcffilename
Opens the specified .vcf file.
/vcal vcsfilename
Opens the specified .vcs file.
/x xnkfilename
Opens the specified .xnk file.

No comments: