none
Previewing generated emails in Outlook 2003 RRS feed

  • Question

  • I have a Visual Studio app generating an email to be sent to vendors for purchase orders.  I would like to give the purchasing agent the ability to preview and edit the email BEFORE sending it off to the vendor.  We are using Outlook 2003 and Visual Studio 2008.  Is there a way to do this?

    LDC

    Monday, July 13, 2015 7:50 PM

Answers

  • Sure, create the message (Application.CresteItem), set its properties, call MailItem.Display instead of calling Send.

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    • Marked as answer by LyleD Tuesday, July 14, 2015 1:10 PM
    Monday, July 13, 2015 8:15 PM

All replies

  • Sure, create the message (Application.CresteItem), set its properties, call MailItem.Display instead of calling Send.

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    • Marked as answer by LyleD Tuesday, July 14, 2015 1:10 PM
    Monday, July 13, 2015 8:15 PM
  • Hello,

    Take a look at the C# app automates Outlook (CSAutomateOutlook) sample project which demonstrates how to write VC# codes to create and automate a Microsoft Outlook instance and show items to users.

    Tuesday, July 14, 2015 9:07 AM
  • Hi Dmitry ... your suggestion worked perfectly.  Well, almost.... the message body that is written in HTML comes out as just text.  Just another challenge to overcome!  Thanks for the solution, though!!

    LDC

    Tuesday, July 14, 2015 1:10 PM
  • Kinda helps the cause when you use msg.HTMLBody, rather than msg.Body.... DOH!!  8)

    LDC

    Tuesday, July 14, 2015 1:51 PM