![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
#4
|
|||
|
|||
![]()
Hello,
Here's some sample code I use in Excel to play around with email properties. You could easily adapt this to do what you want. Dim olApp As Outlook.Application Dim olNS As Outlook.Namespace Dim olInbox As Outlook.MAPIFolder Dim Item As Outlook.MailItem Set olApp = GetObject(, "outlook.application") Set olNS = olApp.GetNamespace("MAPI") Set olInbox = olns.GetDefaultFolder(olFolderInbox) If olInbox.UnReadItemCount 0 Then For Each Item In olInbox.Items.Restrict("[Unread] = True") MsgBox olInbox.UnReadItemCount & "unread emails" Msgbox "To: " & Item.To Msgbox "From: " & Item.SenderName Msgbox "Subject: " & Item.Subject Msgbox "Body: " & Item.body Next Item Else MsgBox "No new/unread emails", vbInformation End If 'destroy Set olInbox = Nothing Set olNS = Nothing Set olApp = Nothing HTH, JP On Nov 3, 9:23 am, Rob wrote: I want to automatically extract the body of an incoming email and export the result to a database or spreadsheet. Similar functions are available through tools such as Mailbag Assistant for Outlook Express and other email programs. Is there a way to do this with Microsoft Outlook? -- Rob |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Extracting Email from contact Item | bbnimda | Outlook and VBA | 1 | October 31st 07 01:21 PM |
Where does Outlook 07 store POP3 email account info | Tim L. Pearson | Outlook - General Queries | 3 | December 8th 06 12:39 PM |
O2003- how to show email account info? (esp. via email hyperlink on a button) | StargateFan | Outlook - General Queries | 2 | March 22nd 06 12:35 PM |
Extracting email body (only last one) | rg | Outlook and VBA | 1 | February 27th 06 06:17 AM |
extracting email messages out of Journal | Martin Rhodes | Outlook - General Queries | 0 | January 30th 06 11:05 PM |