+ Reply to Thread
Results 1 to 2 of 2

Open Outlook / send existing mail

Hybrid View

koltregaskes Open Outlook / send existing... 05-28-2012, 04:45 AM
Pepe Le Mokko Re: Open Outlook / send... 05-28-2012, 04:47 AM
  1. #1
    Registered User
    Join Date
    02-08-2005
    Location
    Kent, UK
    MS-Off Ver
    2010
    Posts
    69

    Question Open Outlook / send existing mail

    I have the following code that sends me a mail when a certain activity has been completed in my macro:

        Dim objOL As New Outlook.Application
        Dim objMail As MailItem
        Set objOL = New Outlook.Application
        Set objMail = objOL.CreateItem(olMailItem)
        With objMail
            .To = "myemail"
            '.Sender = "Report"
            .Subject = "REPORT DONE- " & Format(Date, "dd-mmm-yyyy") & " - " & Format(Time, "hh:mm:ss")
            '.Body = ""
            '.Display
            .Send
        End With
        Set objMail = Nothing
        Set objOL = Nothing
    One problem is that it errors when Outlook is not open, what code do I need to add to have the macro open Outlook if it's not already open?

    Also, the basic mail it sends me is fine but was wondering if it's possible to open an existing mail that is set-up with a distribution list, subject and body, which includes a few tables and formatted text?

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,616

    Re: Open Outlook / send existing mail

    Maybe Ron de Bruin's code can help

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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