Retrieving the message and subject of email

G

Guest

Hope someone can give me a hand with this.

I have a VB app in which I have implemented a feature to allow the user to
double click on an email address in an entryfield to open outlook and send to
that email address.

I’d like to take this another step. After they type in their email message
and subject, and click on send, the email is sent to the Outlook outbox and
ultimately to the sent folder.

I’d like to retrieve the message and subject they entered and sent, and
store this in another database. I assume I would need to continuously check
the outbox and/or the sent box for the email. But what can I use to locate
the email. I would not have the subject to search for. Is there some other
property I can use to locate this email? Is there a property value I can
assign some unique number after they double click on the entryfield, and
before they prepare the email and click on send in Outlook, that would give
me something to locate the email? Ot do I simply locate the last email sent
in the Outbox? Anyone have any code they could share for this?

Many thanks for any help or ideas on this,
Mark
 
M

Michael Bauer [MVP - Outlook]

Do you create the e-mail by code? If so then you do have a reference to it
and can receive the item's events:

Private WithEvents m_Mail as outlook.MailItem

Private Sub m_Mail_Send(Cancel As Boolean)
' get here the subject
End Sub


--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
Quick-Cats - Categorize Outlook data:
<http://www.vboffice.net/product.html?id=2006063&cmd=detail&lang=en&pub=6>

Am Sun, 22 Apr 2007 18:28:01 -0700 schrieb Markus:
 

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