Scheduled Task Doesn't work with Outlook 2007
I have a small Access application that runs, initiates an instance of
Outlook, creates necessary emails, and exits. This is running on a server as a scheduled task. This worked fine with Outlook 2003. Client did a server upgrade and upgraded to Outlook 2007. Now this task fails. If Outlook is open, it runs fine but it fails if outlook is closed. Is there a way to do this in Outlook 2007 without having Outlook open? Any help is greatly appreciated. Here is snippets of the code. It bombs on the recipients.add line. If Outlook is open though, it runs without issue. Just not super practical on a server with a scheduled task. Set olookApp = New Outlook.Application .. .. some other unrelated code here, setting up a while loop etc... .. emailto = artsenddetail![emailaddress] Set olookMsg = olookApp.CreateItem(olMailItem) With olookMsg Set olookRecipient = .Recipients.Add(emailto) olookRecipient.Type = olTo .Subject = "Art Verification - Project: " & artsend! [BudgetNum] & " " & artsend![BudgetName] .Body = control![ArtVerifyBody] & newline & newline & standardclosing If Not (IsNull(control![CompanyEmail])) Then .ReplyRecipients.Add (control![CompanyEmail]) End If Set olookAttach = olookMsg.Attachments.Add(filenamedest) olookMsg.Send End With |
Scheduled Task Doesn't work with Outlook 2007
Further information... The error I get is 287 - Application-defined
or object-defined error |
All times are GMT +1. The time now is 10:58 AM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com