A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Scheduled Task Doesn't work with Outlook 2007

Thread Tools Search this Thread Display Modes
Old October 27th 09, 12:06 PM posted to microsoft.public.outlook.program_vba
external usenet poster
Posts: 8
Default 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 &

If Not (IsNull(control![CompanyEmail])) Then
.ReplyRecipients.Add (control![CompanyEmail])
End If

Set olookAttach = olookMsg.Attachments.Add(filenamedest)
End With

Old October 27th 09, 02:35 PM posted to microsoft.public.outlook.program_vba
external usenet poster
Posts: 8
Default Scheduled Task Doesn't work with Outlook 2007

Further information... The error I get is 287 - Application-defined
or object-defined error

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA and Scheduled task in Outlook small caps Outlook - General Queries 1 July 11th 09 04:37 PM
want only scheduled tasks appear on task list next to calendar matsant Outlook - Calandaring 1 February 22nd 09 11:03 AM
Outlook 2007 shuts down when processing scheduled calendar items Peter Outlook - Calandaring 0 September 4th 08 04:46 PM
Can I sum up all of my scheduled time in a view in Outlook 2007? Martin Edelius Outlook - Calandaring 5 October 22nd 07 02:56 AM
Outlook and employee scheduled work hours CoachKA Outlook - Calandaring 5 September 21st 06 05:14 PM

All times are GMT +1. The time now is 07:18 AM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright 2004-2018 Outlook Banter.
The comments are property of their posters.