Click here to Skip to main content
15,892,537 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,
My windows application has a timer which every few hours reads my outlook inbox...
In the code I am using:
C#
Microsoft.Office.Interop.Outlook.Application()


On my machine where I run this app. if I have my outlook open then the folowing code works

C#
ns.Logon(null, null, false, false);


But, if I have outlook closed, then on that line above I get the following error even if I use the credentials i.e.
C#
ns.Logon("domain\username", "pwd", false, false);


Could not complete the operation. One or more parameter values are not valid.

Questions:
1-
Eventually the idea is to have this app on the Prod. server so that it reads an email account which receives the required files to read...
How can I make the code to work without having outlook open?

Thanks
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900