Results 1 to 1 of 1

Thread: Saving Message ID / Conversation ID to spreadsheet

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Junior Member
    Join Date
    Aug 2018
    Posts
    12
    Rep Power
    0

    Saving Message ID / Conversation ID to spreadsheet

    Hello,

    I have a macro to automatically send emails from a spreadsheet, and then log the date sent. How can I also log the Message ID / Conversation ID from the send message?

    VBA Below:

    Thanks!

    Code:
    Sub Mailing_Request_Macro()
      Dim f As Range, source As Worksheet, master As Worksheet, s As String, StrBody As String
      Dim olApp As Outlook.Application, olMail As Outlook.MailItem
      
      Set source = Worksheets("Request List")
      Set master = Worksheets("Master List")
      Set olApp = New Outlook.Application
      
          Set f = master.Range("A:A").Find(c.Value)
          Set olMail = olApp.CreateItem(olMailItem)
          With olMail
          .Display
            .To = f.Offset(, 3).Value 
            .CC = f.Offset(, 4).Value
            .Subject = "Reminder Email"
           
           StrBody = "Hello, this is a Reminder" & vbCrLf & vbCrLf
            .HTMLBody = StrBody & .HTMLBody
            '.Send
          End With
          .Offset(, 3).Value = Date   'Source sheet, Date sent.
        End With
      
      On Error Resume Next
      Set olMail = Nothing
      Set olApp = Nothing
    End Sub
    Last edited by Admin; 08-31-2018 at 01:56 PM.

Similar Threads

  1. Budget Spreadsheet Template
    By rich_cirillo in forum Excel Help
    Replies: 1
    Last Post: 02-12-2013, 10:32 PM
  2. Saving and Running Macro For Multiple Files / Users
    By Charles_ in forum Excel Help
    Replies: 1
    Last Post: 01-07-2013, 09:10 AM
  3. Message Box Before Saving Document
    By Lucero in forum Excel Help
    Replies: 2
    Last Post: 04-15-2012, 07:09 AM
  4. Reading/Saving binary data
    By Rasm in forum Excel Help
    Replies: 3
    Last Post: 02-26-2012, 08:15 PM
  5. Saving Embedded Picture From Excel Workbook Sheet To Folder Hard Drive
    By littleiitin in forum Excel and VBA Tips and Tricks
    Replies: 0
    Last Post: 10-31-2011, 02:31 PM

Posting Permissions

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