Automated Logon w/Outlook 2003

J

John A. Bailo

I have a program that I'm converting from Outlook 2000 to Outlook 2003.

It basically opens Outlook and iterates through a series of items in a
public folder.

I was able to run this as a scheduled task overnight.

But now, it seems to want to have me be logged in already or it will not
log into Outlook.

Also, in 2003, there is this little dialog that says "a program is
trying to access outlook, do you want to give it access for" and then
there's a drop down with 1 minute, 3minutes, 10 minutes.

How can I configure my Outlook 2003 client so my interop program can
login and run without any dialog boxes or without my having to have the
client open at the time it runs?
 
S

Sue Mosher [MVP-Outlook]

See http://www.outlookcode.com/d/sec.htm for your options with regard to the "object model guard" security in Outlook 2000 SP2 and later versions.

Have you set up Outlook 2003 to always start with the same profile? Are you performing a Namespace.Logon in your code?

In general, Outlook is not suitable for unattended automation like your scenario.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
J

John A. Bailo

Sue said:
See http://www.outlookcode.com/d/sec.htm for your options with regard to the "object model guard" security in Outlook 2000 SP2 and later versions.

Have you set up Outlook 2003 to always start with the same profile? Are you performing a Namespace.Logon in your code?

In general, Outlook is not suitable for unattended automation like your scenario.

I found a solution:

http://www.mapilab.com/outlook/security/

This free component lets me manually assign permissions to third party
software for accessing Outlook. It worked great for my c# program.

I totally disagree with your and Microsoft's opinion on automating via
the client. This is entirely in line with the entire .NET smart client
scenario. The Office clients provide a rich OM for manipulating the
server back end. I find that it's much easier to design, build, debug
around them than fighting direct connections to the server back end.
 
S

Sue Mosher [MVP-Outlook]

I totally disagree with your and Microsoft's opinion on automating via the client.

How do you know what my opinion is? Did you read my mind? I don't recall stating any opinions.
The Office clients provide a rich OM for manipulating the server back end.

For Word and Excel 2003 using VSTO 2005, that's definitely true. There are great server applications to be built with those tools.

Outlook is totally different story. The article at http://support.microsoft.com/kb/237913/ explains some of the pitfalls, including the issue that only one instance of Outlook can be running at a time. So, whose Outlook data will the server access and what will happen to requests to access other data while that process is running?
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
J

John A. Bailo

Sue said:
including the issue that only one instance of Outlook can be running at a time. So, whose

Are you saying you can run more than one instance of Excel or Word at a
time?
 
S

Sue Mosher [MVP-Outlook]

No, that's not what I said.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top