Solved

Outlook only processes outgoing mail when openned

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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Excel Question 17 15
Excel file that does not ask to be saved before exiting 6 23
Excel Charts: How is this Chart made? 8 29
Outlook 2013 License Question 8 27
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
Are you unable to connect or configure Hotmail email account in Microsoft Outlook 2010, 2007? Or Outlook.com emails are not downloading to Outlook? Lets’ see the problem and resolve Outlook Connector error syncing folder hierarchy (0x8004102A).
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

810 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