[Webinar] Learn how to a build a cloud-first strategyRegister Now


Code for Sub to Request Delivery Receipt and Read Receipt

Posted on 2006-03-23
Medium Priority
Last Modified: 2008-01-09
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>"

Question by:charming
1 Comment
LVL 93

Accepted Solution

Patrick Matthews earned 320 total points
ID: 16275064
Hi charming,

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



Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Suggested Courses

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question