Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi, I receive everyday email with data... I want to import this data into my excel sheet.. How can I do this? Thanks for help! Carl |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Charlie
Start here www.dicks-clicks.com and post back with more specific questions if you have them. -- Dick Kusleika MVP - Excel www.dicks-clicks.com Post all replies to the newsgroup. "Charlie" wrote in message ... Hi, I receive everyday email with data... I want to import this data into my excel sheet.. How can I do this? Thanks for help! Carl |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Thu, 6 Nov 2003 12:27:18 -0600, "Dick Kusleika"
wrote: Charlie Start here www.dicks-clicks.com and post back with more specific questions if you have them. Dick, The "retrieving EMail" code worked great for me with XP. How should I change the "olMail.ReceivedTime" in the line ActiveSheet.Cells(i, 1).Value = olMail.ReceivedTime to copy the whole body of the email. TIA Ron |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ron
ActiveSheet.Cells(i, 1).Value = olMail.Body will copy the entire body of the email into that cell. I don't know if there are limits on how much text you can bring over. -- Dick Kusleika MVP - Excel www.dicks-clicks.com Post all replies to the newsgroup. "Ron" wrote in message ... On Thu, 6 Nov 2003 12:27:18 -0600, "Dick Kusleika" wrote: Charlie Start here www.dicks-clicks.com and post back with more specific questions if you have them. Dick, The "retrieving EMail" code worked great for me with XP. How should I change the "olMail.ReceivedTime" in the line ActiveSheet.Cells(i, 1).Value = olMail.ReceivedTime to copy the whole body of the email. TIA Ron |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dick,
The email code also worked fine for me... Except I want the email body not in 1 cell, but I want to have each line of the body in a different row. Is that possible? Thanks "Dick Kusleika" wrote in message ... Ron ActiveSheet.Cells(i, 1).Value = olMail.Body will copy the entire body of the email into that cell. I don't know if there are limits on how much text you can bring over. -- Dick Kusleika MVP - Excel www.dicks-clicks.com Post all replies to the newsgroup. "Ron" wrote in message ... On Thu, 6 Nov 2003 12:27:18 -0600, "Dick Kusleika" wrote: Charlie Start here www.dicks-clicks.com and post back with more specific questions if you have them. Dick, The "retrieving EMail" code worked great for me with XP. How should I change the "olMail.ReceivedTime" in the line ActiveSheet.Cells(i, 1).Value = olMail.ReceivedTime to copy the whole body of the email. TIA Ron |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
charelke
The Body property is just a string, so you can manipulate it like any other stirng. Here's an example Sub emaillines() Dim ol As Outlook.Application Dim ns As Outlook.NameSpace Dim fldr As Outlook.MAPIFolder Dim mi As Outlook.MailItem Dim stBody As String Dim LineBreak As Long Dim i As Long Set ol = New Outlook.Application Set ns = ol.GetNamespace("MAPI") Set fldr = ns.GetDefaultFolder(olFolderInbox) Set mi = fldr.Items(78) stBody = mi.Body LineBreak = 1 i = 1 Do ActiveSheet.Cells(i, 1).Value = _ Mid(stBody, LineBreak, InStr(LineBreak, stBody, Chr(10)) - LineBreak) LineBreak = InStr(LineBreak + 1, stBody, Chr(10)) + 1 i = i + 1 Loop Until LineBreak = 0 Or LineBreak Len(stBody) End Sub -- Dick Kusleika MVP - Excel www.dicks-clicks.com Post all replies to the newsgroup. "charelke" wrote in message om... Dick, The email code also worked fine for me... Except I want the email body not in 1 cell, but I want to have each line of the body in a different row. Is that possible? Thanks "Dick Kusleika" wrote in message ... Ron ActiveSheet.Cells(i, 1).Value = olMail.Body will copy the entire body of the email into that cell. I don't know if there are limits on how much text you can bring over. -- Dick Kusleika MVP - Excel www.dicks-clicks.com Post all replies to the newsgroup. "Ron" wrote in message ... On Thu, 6 Nov 2003 12:27:18 -0600, "Dick Kusleika" wrote: Charlie Start here www.dicks-clicks.com and post back with more specific questions if you have them. Dick, The "retrieving EMail" code worked great for me with XP. How should I change the "olMail.ReceivedTime" in the line ActiveSheet.Cells(i, 1).Value = olMail.ReceivedTime to copy the whole body of the email. TIA Ron |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
import email addresses into a outlook distribution list | Excel Discussion (Misc queries) | |||
Outlook Email | New Users to Excel | |||
How do I import Outlook email into Excel, as object? | Excel Discussion (Misc queries) | |||
Import Email from Outlook into Worksheet | Excel Discussion (Misc queries) | |||
Email & Outlook | Excel Discussion (Misc queries) |