Request delivery receipt when sending emails

ppataki

Registered User.
Local time
Today, 12:22
Joined
Sep 5, 2008
Messages
267
Dear All,

When sending emails through Outlook in Access I would like to somehow enable delivery receipt

Could you please help me with the code?
(I would just need that specific line)

Many thanks in advance!
:)
 
This type of thing?

oMail.ReadReceiptRequested = True
 
Hi,
Yes, but unfortunately if I add this line I get an error message that Object is required
Any ideas please?
Thank you!
 
pbaldy is right. he assumes your object is oMail.
You said
When sending emails through Outlook in Access ...
How do you do that then? Could you show us your code?
 
Hello!
Of course, here you are:
Code:
    Dim olapp As Object
    Dim olns As Object
    Dim olfolder As Object
    Dim olitem As Object
    Dim olattach As Object

    Set olapp = CreateObject("Outlook.Application")
    Set olns = olapp.GetNamespace("MAPI")
    Set olfolder = olns.getdefaultfolder(6)
    Set olitem = olapp.createitem(0)
    Set olattach = olitem.attachments

    'olitem.To = ""
    olitem.CC = ""
    olitem.Subject = ""
    olitem.body = "

    olattach.Add "c:\temp\.pdf", 1

    olattach.Add "c:\temp\.pdf", 1
    
    olitem.display
    olitem.send

    Set olitem = Nothing
    Set rs = Nothing
    Set db = Nothing
    Set olfolder = Nothing
    Set olns = Nothing
    Set olapp = Nothing
And if I insert that line in the code I get the abovementioned error message

Many thanks
 
Seems to me that
Code:
oMail.ReadReceiptRequested = True
is a mail item property so
Code:
Dim olapp As Object
    Dim olns As Object
    Dim olfolder As Object
    Dim olitem As Object
    Dim olattach As Object

    Set olapp = CreateObject("Outlook.Application")
    Set olns = olapp.GetNamespace("MAPI")
    Set olfolder = olns.getdefaultfolder(6)
    Set olitem = olapp.createitem(0)
    Set olattach = olitem.attachments

    'olitem.To = ""
    olitem.CC = ""
    olitem.Subject = ""
    olitem.body = "

    olattach.Add "c:\temp\.pdf", 1

    olattach.Add "c:\temp\.pdf", 1
    
    olitem.ReadReceiptRequested = True 
    olitem.display
    olitem.send

    Set olitem = Nothing
    Set rs = Nothing
    Set db = Nothing
    Set olfolder = Nothing
    Set olns = Nothing
    Set olapp = Nothing
Should do the trick.

HTH:D
 
Is there a way to code DELIVERY RECEIPT, not read receipt?

I already tried this of course, but doesn't seem to be recognized by VBA:

oMail.DeliveryReceiptRequested = True

Results in
"Run-Time error '438':
Object doesn't support this property or method
"

EDIT
After some more searching the correct code is as follows

"oMail.OriginatorDeliveryReportRequested = True"
 
Thanks for updating with the solution and welcome to the site.
 

Users who are viewing this thread

Back
Top Bottom