Solved

Outlook only processes outgoing mail when openned

Posted on 2009-05-14
3
215 Views
Last Modified: 2012-05-07
suddenly Outlook does not process outgoing mail created using VBA except when Outlook is opened on the desktop. The mail can be seen staged in the "Outbox" and will process instantly upon the program startup. I have included the snips that create the e-mail within the VBA code.
Dim olApp As Outlook.Application

    Dim olMail As MailItem

    Dim CurrFile As String

    Set olApp = New Outlook.Application

    Set olMail = olApp.CreateItem(olMailItem)

    ActiveWorkbook.Save

    CurrFile = ActiveWorkbook.Path & "\" & ActiveWorkbook.Name

    With olMail

    .To = "bgustafson@lincolnwayenergy.com;dzimmerman@lincolnwayenergy.com;single@lincolnwayenergy.com;srichardson@lincolnwayenergy.com;tharrison@lincolnwayenergy.com;vwalter@lincolnwayenergy.com"

    .CC = "rsauer@hawkrenew.com;ehalverson@hawkrenew.com"

    .Subject = "Distiller Grain Load and Contract update - Nevada"

    .Body = ActiveSheet.Range("c3").Text & vbCrLf

    '.Attachments.Add CurrFile

    .Attachments.Add "s:\reports\nevada loads pub.xls"

    .Display

    .Send

    End With

    Set olMail = Nothing

    Set olApp = Nothing

Open in new window

0
Comment
Question by:bradleydandrews
  • 2
3 Comments
 
LVL 47

Expert Comment

by:apache09
ID: 24390730
What version of Outlook are you using?

If you have just upgraded to a more recent version its likely the Security Update in Outlook has now stopped this from happening.

http://www.slipstick.com/outlook/esecup.htm


0
 

Author Comment

by:bradleydandrews
ID: 24391535
We are using Outlook 2007 version 12 SP2. Any way to work around the problem with 3rd party fixes similar to "Click Yes"?
0
 

Accepted Solution

by:
bradleydandrews earned 0 total points
ID: 24492781
took out the .Display command and the script runs normally now.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Follow this checklist to learn more about the 15 things you should never include in an email signature from personal quotes, animated gifs and out-of-date marketing content.
Following basic email etiquette rules will help you write a professional email and achieve a good, lasting impression with your contacts.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now