![]() |
| If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|||||||
| Tags: incomming, information, items, mail, retrieving |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
I am using Outlook2k and WinXP. When a new mail arrives,
I want to get some information like the name of the sender, what is the subject and body text? How can I retrieve such properties from the incoming mail item? I thought this was a good place to start... Private Sub Application_NewMail() ....code... End Sub Any suggestions or code sample is very much apprieciated. Regards Jan. |
| Ads |
|
#2
|
|||
|
|||
|
Am Sun, 17 Sep 2006 23:43:57 +0200 schrieb Jan G. Thorstensen:
NewMail fires only once for a bundle of messages. Instead you can use ItemAdd, which fires for each message as long as there´re not more than 16 at once. That event has an Item argument, which is a reference to the incoming message. Simply read its SenderName (that´s the sender´s display name), Subject and Body properties. In OL 2000 there´s no way to read the Sender´s address directly. For that you´d need CDO 1.21 or Redemption (www.dimastr.com). -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook -- www.VBOffice.net -- I am using Outlook2k and WinXP. When a new mail arrives, I want to get some information like the name of the sender, what is the subject and body text? How can I retrieve such properties from the incoming mail item? I thought this was a good place to start... Private Sub Application_NewMail() ...code... End Sub Any suggestions or code sample is very much apprieciated. Regards Jan. |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| error retrieving folder.items.count | kappe79 | Outlook and VBA | 3 | September 19th 06 02:29 PM |
| Reply to incomming mail problem | carebear | Outlook Express | 1 | August 16th 06 08:31 PM |
| how do i auto copy an incomming e-mail to a personal folder | jeff65 | Outlook - Installation | 1 | May 21st 06 10:35 AM |
| stokp out look from retrieving mail while off` | sacredarms | Outlook - General Queries | 1 | April 18th 06 04:02 AM |
| error 0x80040900 in outlook retrieving mail | Ruthin@gmail.com | Outlook - General Queries | 5 | February 15th 06 05:46 PM |