Solved

Outlook only processes outgoing mail when openned

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

RoboForm Secure Password Management System

RoboForm Everywhere - Superb Browser Support
Windows / Apple / IOS / Android / Linux / Chrome OS
Use different complex passwords everywhere
Best Secure Password Management by far
Synchronize all of your devices instantly
Safe, Secure & Highly Recommended!

Question has a verified solution.

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

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
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…

752 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