Question : Retrieve an email ID from Outlook when creating an email from Access

I have an Access ADP project that allows users to send an email from the system, I use Redemption to bypass the Outlook security dialogues. Once the email has been sent it must be saved in the database so that other users can view it at a later date.

Currently, the way I do this is to have a form "Send email" that has boxes for the "To","CC","BCC","Subject","Body", read receipts, attachments etc. Using VBA I then construct the email, save it as an MSG file, import it into the SQL database using ADO.Stream, then Send it.

This achieves the objective but it isn't very "nice" - the user cannot see what the email looks like before it goes, signatures are a problem and when it is viewed at a later date Outlook kindly states on the email "This message has not been sent" (which is a lie) which causes a bit of uncertainty amongst users.

So, I am wondering if we can fire up an email in Outlook (I can do this bit) maybe obtain the ID of the email - the user can do what they want to the email and then send it. My code would then retrieve the email from the sent items using the ID it obtained earlier.

Is this possible? Or does anyone have another way of doing it?

One other idea I had was to fire up the email, prompt the user to make any changes and then close it without sending it. I would then save and send it in VBA. The problem I had with this method is detecting when the user has closed the msg file (see this question for details about this issue:

http://www.experts-exchange.com/Microsoft/Development/MS_Access/Access_Coding-Macros/Q_23637767.html

)

Thanks!

(I have previously asked this question in the Access section so apologies if you have seen it before)

Answer : Retrieve an email ID from Outlook when creating an email from Access

Random Solutions  
 
programming4us programming4us