Generate email, let user alter, find email again and save ...

G

Guest

I am developing a program that should do the following:

1. Generate an email with subject, sender and body.
2. Send the email to Outlook and let the user alter whatever he/she wishes.
3. The tricky part – when the user presses send my program should grab the
altered email and save in on the disk.

The first two steps I have figured out, but the last step gives me trouble!
I thought I could use the EntryID but somehow Outlook changes the EntryID
when the email is send? How do I find the email again? Is there perhaps a
variable on the email item I can assign a unique ID of my own?

Hope someone can help me out – a Delphi example would be GOLD - but I think
I can convert VBA code to Delphi if not :)

Thanks in advance.

- Rune
 
K

Ken Slovak - [MVP - Outlook]

You can trap the Send event on the opened item if it is opened using an
event handler for ActiveInspector.CurrentItem.Send.

You can trap the ItemAdd event on the Items collection of the Sent Items
folder. See http://www.outlookcode.com/d/code/zaphtml.htm#cw for a VBA/VB
example of an ItemAdd handler for the Inbox.

You can add a user property (Item.UserProperties.Add).
 
D

Dmitry Streblechenko

Or you can use the Application.ItemSend event if you don't need the sender
related properties.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top