• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1138
  • Last Modified:

Programmatic Access to Outlook 2007

We've been automating Outllook for some time to send emails from our Visual FoxPro application.  But Outlook 2007 yields "0x80004004:  Operation aborted" on certain installations.  Can anyone tell me what might produce this?

In the trust center for Outlook, Programmatic Access, "Warn me about suspicous activity..." is selected.  Other options cannot be selected because anti-virus detection is not avalable in the version of Windows installed (Windows Server 2008 Standard).
0
Magram
Asked:
Magram
  • 4
  • 3
  • 3
1 Solution
 
CaptainCyrilFounder, Software Engineer, Data ScientistCommented:
0
 
CaptainCyrilFounder, Software Engineer, Data ScientistCommented:
I had problems with outlook so I switched to CDOSYS and CDONTS
0
 
MagramAuthor Commented:
I should have added that we're not trying to run an unattended, non-interactive application in a server environment.  We update our client's systems manually, usually by gaining access via RDP to their servers.  Once updated files are in place, we'll do a run-through for some minimal environmental testing.  Again, this is a Visual FoxPro app, not ASP, ASP.NET, etc.
Could there be any security settings outside of Outlook, say in local security policy, which disallows Outlook automation?  Can you suggest anything else?
Rick
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
CaptainCyrilFounder, Software Engineer, Data ScientistCommented:
I don't have much experience in that. Sorry.
0
 
Olaf DoschkeSoftware DeveloperCommented:
What you outlined in your question already is a security option not allowing outlook automation by default. On a client - and I assume on a server this makes no difference - outlook displays a popup dialog offering the user to let a programm access outlook for the newt minute or so.

Security settings must allow programmatic usage of outlook, that's the best solution. I don't know if there are some new security options in outlook 2007, but the problem you have is old and was introduced with outlook 98(!) security.

The default option of this dialog is to abort the external programs operations on outlook and after a timeout your app then get's this ole error.

Google outlook redemption.

Bye, Olaf.
0
 
MagramAuthor Commented:
There may be security settings somewhere, but where?  I'm not getting a popup.  I'm getting the error "0x80004004:  Operation aborted."  
0
 
Olaf DoschkeSoftware DeveloperCommented:
Well, your apps get's this error, because noone is at the server reacting to the popup. The popup may even never be visible, because you perhaps don't make your outlook instance visible, do you? Then I'd expect that or a similar OLE error. I'm pretty sure that's it.

There are Registry entries you need to make to allow OLE automation of outlook without such errors. These and more options (setting up Exchange) is described here:
http://office.microsoft.com/en-us/ork2000/HA011524811033.aspx

More on VFP and Outlook automation including a reference to Redemption here:
http://www.tedroche.com/Present/2003/OutlookAutomation.html

Bye, Olaf.
0
 
MagramAuthor Commented:
I looked at the documentation you refer to.  They don't specifically address the error that we're seeing:  "0x80004004:  Operation aborted"  Exchange Server is not installed.  I don't know that I'm seeing anything in there that specifically addresses OLE errors.
I do see documentation devoted to circumventing Outlook's security patches, etc., but not this "operation aborted" issue.
0
 
Olaf DoschkeSoftware DeveloperCommented:
Well, I can assure you, that you do get an OLE error from a vfp application trying to create a mail item, if noone does react to the popup dialog, because I had this exact same problem. I don't know if this was the exact same ole error, but the popup dialog asking for granting access has a timeout itself and if nobody reacts to this the application trying to create or send an outlook mail item get's an ole error.

Bye, Olaf.
0
 
MagramAuthor Commented:
Allowing programmatic access in the Outlook 2007 trust center plus full macro access appears to have resolved this.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 4
  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now