• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 337
  • Last Modified:

Code for Sub to Request Delivery Receipt and Read Receipt

I have some code behind a button on my Form that performs some Outlook functionality.  What I need is the code to do 2 additional things which are currently done manually.  Currently the user checks in Outlook Request a Delivery Receipt for this message and Request a Read Receipt for this message.  How can i set this in code i.e.

MyMail.(Property or code to Request a Delivery Receipt for this message)
MyMail.(Property or code to Request a Read Receipt for this message)


****Code so far*********

On Error GoTo Err_Command5_Click
 Dim MyOutlook   As Outlook.Application
  Dim MyMail      As Outlook.MailItem
  Dim MyBodyText  As String
  Dim frm         As Form
  Dim ctl         As Control
  Dim varItem     As Variant
  Dim strSql      As String
  Dim myattachments    As Variant
  Dim lItemCount  As Long
  Dim mailStationery As String
  'send email with spreadsheet

  Set MyOutlook = New Outlook.Application
  Set MyMail = MyOutlook.CreateItem(olMailItem)
  MyMail.To = Text1
  MyMail.CC = ""
  MyMail.BCC = ""
  MyMail.BodyFormat = olFormatHTML
  MyMail.Subject = "All Managers"
  'MyBodyText = "Here is the document"
  'Set myattachments = MyMail.Attachments
  'myattachments.Add "C:\JetComp.doc"
  MyMail.SentOnBehalfOfName = "Review"
  'put the HTML code for the stationery to a variable and then assign
  'it to the HTMLBody
MyMail.Body = Text2
  'MyMail.HTMLBody = "<HTML><HEAD>My HTML Background</HEAD>" & _
    "<BODY bgcolor=Green></BODY></HTML>"

1 Solution
Patrick MatthewsCommented:
Hi charming,

With MyMail
    .ReadReceiptRequested = True
    .OriginatorDeliveryReportRequested = True
End With


Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

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