![]() |
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 |
|
#1
|
|||
|
|||
![]()
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 |
#2
|
|||
|
|||
![]()
Outlook (unlike Outlook Express) has a rich programming model allowing automation from its own VBA environment, as well as outside applications. You'd use the MailItem.Body property to return the message body.
-- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Rob" wrote in message ... 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 |
#3
|
|||
|
|||
![]()
Unless you are specifically looking for an existing solution, you could
easily develop this yourself using VBA and the Outlook Object Model. See this example for handling incoming e-mails: How to create a custom rule using Visual Basic for Applications (VBA) in Outlook 2002: http://support.microsoft.com/default...b;en-us;292063 And this will set you on your way for integrating with a database: Connecting Outlook to Databases: http://www.outlookcode.com/article.aspx?ID=25 -- Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.) Try Picture Attachments Wizard for Outlook: http://www.collaborativeinnovations.ca Blog: http://blogs.officezealot.com/legault/ "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 |
#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 02:21 PM |
Where does Outlook 07 store POP3 email account info | Tim L. Pearson | Outlook - General Queries | 3 | December 8th 06 01:39 PM |
O2003- how to show email account info? (esp. via email hyperlink on a button) | StargateFan | Outlook - General Queries | 2 | March 22nd 06 01:35 PM |
Extracting email body (only last one) | rg | Outlook and VBA | 1 | February 27th 06 07:17 AM |
extracting email messages out of Journal | Martin Rhodes | Outlook - General Queries | 0 | January 31st 06 12:05 AM |