Launching Outlook with profile argument containing spaces

I’m trying to open Outlook and pass the profile argument to launch with an alternate profile as shown below. I originally was passing the profile name as an argument to the workflow because I wanted to make the workflow re-usable. However testing led me to hard coding the profile name.

Still I am receiving the error below.

image

Testing the string in a message box as per the first screenshot, it appears to pass the string as desired

image

I’ve confirmed the returned string itself works when used in a Run box.

image

I’ve attempted the following combinations of quotes to attempt to pass the arguments.

  • “”“/profile ““Accounts Payable”””
  • “”“”“/profile “””“Accounts Payable”“”“”
  • “”“/profile ‘Accounts Payable’”“”

Could someone please provide a working syntax for passing this argument to Outlook? Hard coded value would be great. If it can be passed as a variable, even better. Thanks :slight_smile:

Note: This is an attempted workaround to the issue outlined here where I can’t access shared mailbox folders.

EDIT: I’ve recreated the mail profile to remove the space from the profile name but still get the same result with all syntaxes above.

EDIT: More syntaxes attempted;
“/profile ‘AccountsPayable’”
“/profile ‘“AccountsPayable”’”

You’ll want to prefix your Arguments property with the executable name and escape your double quotes if you are going to use them. "OUTLOOK.EXE /profile ""My Profile"""

image

3 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.