Solved

Outlook only processes outgoing mail when openned

Posted on 2009-05-14
3
235 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

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.

Question has a verified solution.

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

Mailbox Overload?
This article describes how to import an Outlook PST file to Office 365 using a third party product to avoid Microsoft's Azure command line tool, saving you time.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

615 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