Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default How can i get formatted data from outlook to excel?

Hi, I found people here are really good at this..

I got hundreds of emails contain data in regular form,

and I wanna get this data into excel automatically.

Actually, right now I copy data from every email and paste to the txt
file by myself,

and then run VBA(excel) to get data in each cells in excel.

But i found it really hard to copy and paste hundreds of emails
everyday.

Plz help me!!

Thank you!

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 138
Default How can i get formatted data from outlook to excel?

I'm not sure what you want to achieve, but here's a start:
This Excel macro writes all mails of an Outlook folder "DataMails" into a
TXT file. You will get an error message if the mails are not plain text,
since VBA can't write binary files. It might be a better idea to tweak the
macro and import the mails directly into an Excel sheet.

Cheers
Joerg Mochikun

Sub WriteOutlookItemsToTextfile()
Dim ap, ns, mi, fd, outputfile
Dim x As Integer
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Const TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0
Const fpath = "C:\temp\outputfile.txt" '<= Adapt name

Set fs = CreateObject("Scripting.FileSystemObject")
Set ap = CreateObject("Outlook.Application")
Set ns = ap.GetNameSpace("MAPI")
Set fd = ns.folders("Mailbox - MyName").folders("DataMails") '<= Adapt
names
fs.CreateTextFile fpath
Set outputfile = fs.GetFile(fpath).OpenAsTextStream(ForWriting,
TristateUseDefault)
For x = 1 To fd.items.Count
outputfile.Write fd.items(x).Body
Next x
End Sub



wrote in message
ups.com...
Hi, I found people here are really good at this..

I got hundreds of emails contain data in regular form,

and I wanna get this data into excel automatically.

Actually, right now I copy data from every email and paste to the txt
file by myself,

and then run VBA(excel) to get data in each cells in excel.

But i found it really hard to copy and paste hundreds of emails
everyday.

Plz help me!!

Thank you!



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 138
Default How can i get formatted data from outlook to excel?

Maybe even better approach: Use the export function of Outlook and export
all mails of a folder into a single textfile. Import this file to Excel,
delete unnecessary lines and keep what you need .... and you are almost
done.

Joerg Mochikun


"Joerg" wrote in message
...
I'm not sure what you want to achieve, but here's a start:
This Excel macro writes all mails of an Outlook folder "DataMails" into a
TXT file. You will get an error message if the mails are not plain text,
since VBA can't write binary files. It might be a better idea to tweak the
macro and import the mails directly into an Excel sheet.

Cheers
Joerg Mochikun

Sub WriteOutlookItemsToTextfile()
Dim ap, ns, mi, fd, outputfile
Dim x As Integer
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Const TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0
Const fpath = "C:\temp\outputfile.txt" '<= Adapt name

Set fs = CreateObject("Scripting.FileSystemObject")
Set ap = CreateObject("Outlook.Application")
Set ns = ap.GetNameSpace("MAPI")
Set fd = ns.folders("Mailbox - MyName").folders("DataMails") '<= Adapt
names
fs.CreateTextFile fpath
Set outputfile = fs.GetFile(fpath).OpenAsTextStream(ForWriting,
TristateUseDefault)
For x = 1 To fd.items.Count
outputfile.Write fd.items(x).Body
Next x
End Sub



wrote in message
ups.com...
Hi, I found people here are really good at this..

I got hundreds of emails contain data in regular form,

and I wanna get this data into excel automatically.

Actually, right now I copy data from every email and paste to the txt
file by myself,

and then run VBA(excel) to get data in each cells in excel.

But i found it really hard to copy and paste hundreds of emails
everyday.

Plz help me!!

Thank you!





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? Richard Excel Discussion (Misc queries) 2 May 13th 23 11:46 AM
converting data in Excel to Outlook LAB in South Excel Discussion (Misc queries) 0 January 30th 06 08:36 PM
HOW DO I TRANSFER DATA FROM EXCEL SPREADSHEET TO OUTLOOK msmagoo Excel Discussion (Misc queries) 1 January 16th 06 05:33 PM
Help PLEASE! Not sure what answer is: Match? Index? Other? baz Excel Worksheet Functions 7 September 3rd 05 03:47 PM
How do I enter Outlook contact data into excel? FSTC892 Excel Discussion (Misc queries) 4 June 9th 05 05:25 PM


All times are GMT +1. The time now is 03:59 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"