Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 248
  • Last Modified:

Outlook only processes outgoing mail when openned

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
bradleydandrews
Asked:
bradleydandrews
  • 2
1 Solution
 
apache09Commented:
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
 
bradleydandrewsAuthor Commented:
We are using Outlook 2007 version 12 SP2. Any way to work around the problem with 3rd party fixes similar to "Click Yes"?
0
 
bradleydandrewsAuthor Commented:
took out the .Display command and the script runs normally now.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now