I know that Outlook can be started without any email account configured. There are some methods as explained here and here. Some consists on pass below parameter to Outlook:
Outlook.exe /PIM <your profile name>
This creatse a new profile in Outlook without an email account.
Other methods consists on press 'Cancel' when Outlook ask for a profile. Unfortunatelly this method only seems to work in older Outlook versions <= 2016. I am using Office 365 for business App.
So right now I am debugging my VSTO Outlook Add-in from Visual Studio because I noticed that my VSTO Add-in is crashing when Outlook starts with no email account configured.
From Visual Studio I am trying somehow to start my VSTO Add-in by passing as parameter /PIM or trying to start it without any email account but without success.
Is there any way that I can start my VSTO Outlook Add-in from Visual Studio and that allow me to specify Outlook parameters such as /PIM or without using an email account?
You can specify the command line for VSTO add-ins in the following way:
This configuration works like a charm on my machine with Microsoft Outlook for Microsoft 365 MSO (Version 2304 Build 16.0.16327.20200) 64-bit installed.
Note, the Outlook command line switch /pim
creates a new profile each time you start a program. So, when you run the command line you need to pass a unique profile name to be created.
I'd suggest using the /profile
command line switch when an empty profile was created using the /pim
command which creates a new Mail Profile with the specified name but without an email account. The /profile
command loads the specified profile. If your profile name contains a space, enclose the profile name in quotation marks ("").