+ Reply to Thread
Results 1 to 7 of 7

VBA Generated Outlook Templates fail to send

  1. #1
    Registered User
    Join Date
    02-04-2014
    Location
    United Kingdom
    MS-Off Ver
    Excel 2003
    Posts
    5

    VBA Generated Outlook Templates fail to send

    Good Morning All,

    I've spent a hour going through the forum trying to find a solution to this but no luck - so I ask humbly for your help.

    I've created a spreadsheet that creates reports and saves them to a folder as an .xls. I have also made buttons for different mailing groups that load an OFT Outlook Template, modifies the subject, attaches the report and displays it ready for the user to review and then hit send if they're happy. (Outlook and Excel Version 2010, Win 7)

    Please Login or Register  to view this content.
    Now it all seems to work fine until I actually click 'Send', where it just disappears into the ether never to be seen again. I checked my Outbox, Sent Emails and clicked Send/Receive a hundred times but no luck. If anyone has any clue to why this would fail please help me - this is the last problem I have to solve before completing this project.

    Best,

    Mike
    Last edited by MikeDC85; 06-02-2014 at 06:32 AM.

  2. #2
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: VBA Generated Outlook Templates fail to send

    Try moving the Display after the End With.
    David
    (*) Reputation points appreciated.

  3. #3
    Registered User
    Join Date
    02-04-2014
    Location
    United Kingdom
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: VBA Generated Outlook Templates fail to send

    Try moving the Display after the End With.
    Thanks for the suggestion Tinbendr but sadly no luck. The Email populates upon clicking, with all the correct information and attachments but when clicking 'Send' it just disappears and doesn't appear in any inbox, outbox or sent folders.

  4. #4
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: VBA Generated Outlook Templates fail to send

    I have seen a few examples of code, very similar to yours, that add a .Save inside the with.

    I have seen other posts suggesting that disappearing messages were from duplicate message ID's. Could it be that the message ID is not generated until the message is saved?
    Last edited by Tinbendr; 06-02-2014 at 02:55 PM.

  5. #5
    Registered User
    Join Date
    02-04-2014
    Location
    United Kingdom
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: VBA Generated Outlook Templates fail to send

    Hello Again Tinbendr!

    So I played around with your suggestion adding a .Save, and removing the 'myitem.display' which after 5 mins appeared in my Drafts folder in Outlook and then sent without fault. Which works for me. Big Thank you!!

    I will endeavour to look into Message ID's further and if I find a solution I will it up here for the world to see.

  6. #6
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: VBA Generated Outlook Templates fail to send

    You might change the .Display to .Send, if review is not required.

    Display pauses the Outlook box for a last look. Send doesn't display the windows, it just sends it.

  7. #7
    Registered User
    Join Date
    02-04-2014
    Location
    United Kingdom
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: VBA Generated Outlook Templates fail to send

    Thanks again. I really need a stage in the process where the user can review the email first, so .Save does achieve that but sadly it does take a long time to appear in the 'Drafts' folder. I'm not familiar with Message ID's but if you know of any solution or workaround I'd be forever grateful!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Click to send outlook mail (outlook 2007 )
    By ks1102 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-07-2014, 02:54 AM
  2. outlook redemtion macro cant send mail if outlook is not open ?
    By okl in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-03-2010, 07:35 AM
  3. How can I use Outlook express to send mail rather than Outlook by VBA code
    By new.microsoft.com in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-03-2005, 11:05 AM
  4. [SOLVED] How can I use Outlook express to send mail rather than Outlook by VBA code
    By new.microsoft.com in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-01-2005, 08:05 AM
  5. Send to Outlook 2000 not Outlook Express
    By Jimbo in forum Excel General
    Replies: 2
    Last Post: 01-04-2005, 05:06 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1