Solved

Outlook only processes outgoing mail when openned

Posted on 2009-05-14
3
218 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

MS Outlook is a world-class email client application that is mainly used for e-communication globally.  In this article, we will discuss the basic idea about MS Outlook, its advanced features, and types of MS Outlook File formats.
Read this checklist to learn more about the 15 things you should never include in an email signature.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…

910 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

25 Experts available now in Live!

Get 1:1 Help Now