title: Log into Outlook via Process without Dialog for password
body: <p>When I try to run Outlook via <code>Interop</code> using the profile name it opens a dialog for the password. This script is running from Windows Task Scheduler Task. Does it use the admin account when running these tasks? The profile been made and my email account is the only one loaded in here.</p>
  
  <p>The <code>Always prompt for login credentials</code> is unchecked for the account listed in the profile. </p>
  
  <p>This is a network computer in domain. Outlook 2010.</p>
  
  <p>Profile Switch(<a href="https://support.office.com/en-us/article/Command-line-switches-for-Outlook-for-Windows-079164cd-4ef5-4178-b235-441737deb3a6" rel="nofollow">link</a>):</p>
  
  <pre><code>Process.Start("Outlook", "/profile profilename")
  'logs in with a prompt for the password
  </code></pre>
  
  <p><strong>How can I pass the password in code and avoid the dialog?</strong></p>
  
  <p><strong>Alternatively</strong>, I have a macro that does what I need, but I have not been able to get it to run when the profile loads. This would solve the problem as well. Macros enabled is checked in the Trust Center.</p>
  
  <p>Thanks</p>