Adding a Delivery Receipt to a email using VBA

FlyingKiwi

New Member
Joined
Aug 1, 2007
Messages
6
I have a Excel questionnaire that automatically emails the answers back to me using a Macro.

I would like the macro to turn on Delivery Receipt so that the users of the questionnaire get a confirmation email straight away that the answers were sent.

Can anyone please help with the code to do this.

I expect the answer will be something like this...
Set olApp = CreateObject("Outlook.Application")
Set olMail = olApp.CreateItem(0)
With olMail
.subject = SubjectText
.Recipients.Add stRecipient
.Body = BodyText
[this bit here doesn't work]
.Fields (DispositionNotificationTo)
.Fields (ReturnReceiptTo)

If Len(stAttachment) > 0 Then .Attachments.Add stAttachment
.Send

Thanks in advance
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

FlyingKiwi

New Member
Joined
Aug 1, 2007
Messages
6
Through trail and error I've found the line I was after its:

.OriginatorDeliveryReportRequested = True
 

Forum statistics

Threads
1,181,719
Messages
5,931,660
Members
436,797
Latest member
fullmetalpogi

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top