Import data from a Outlook mail in excel
Hi ,I'm new to this forum,and am not very good in VBA.I'll explain m
problem: Every Friday I'll get a mail from someone with a few numbers. He uses a standard lay-out for it and looks like : Hi here the numbers of week 17 seacontainers : 5 storagecontainers : 15 Now I every week copy these numbers and put them in a excel- file. :( Is there a possibillity to automate this??? What do I have to do? Thanks in advance! Stif -- Message posted from http://www.ExcelForum.com |
Import data from a Outlook mail in excel
Stift
Start here http://www.dicks-clicks.com/excel/olRetrieving.htm You need to parse out the Body property, looking for those keywords. See what you can do with the above link, then if you need help with the specific parsing of the Body, post back. -- Dick Kusleika MVP - Excel Excel Blog - Daily Dose of Excel www.dicks-blog.com "Stift " wrote in message ... Hi ,I'm new to this forum,and am not very good in VBA.I'll explain my problem: Every Friday I'll get a mail from someone with a few numbers. He uses a standard lay-out for it and looks like : Hi here the numbers of week 17 seacontainers : 5 storagecontainers : 15 Now I every week copy these numbers and put them in a excel- file. :( Is there a possibillity to automate this??? What do I have to do? Thanks in advance! Stift --- Message posted from http://www.ExcelForum.com/ |
Import data from a Outlook mail in excel
Owwk, I understand the code. It need some adjustments but I think that
can fix that. Problem is more.Where do I have to set te code ? I want that when I open the excelfile, he will perform this actio automattically(so I don't need a button)! Hope you can help m -- Message posted from http://www.ExcelForum.com |
Import data from a Outlook mail in excel
Stift
Put the code in a standard module. Alt-F11 to open the VBE. Right click on your project in the Project Explorer Window and choose Insert - Module. Make sure you set a reference to the Outlook object library. To get the code to run whenever the workbook is opened, call your sub from the Workbook_Open event. In the VBE, find the ThisWorkbook module under your project and double click it. From the drop down boxes at the top of the ThisWorkbook module, choose Workbook (from the left) and Open (from the right). The VBE will put the Sub and End Sub statements in the code pane. If you macro (in the standard module) is named GetOutlookMail, then the Workbook_Open macro will look like Private Sub Workbook_Open() GetOutlookMail End Sub If you'd rather have a button, then show the Forms toolbar in Excel and drag a command button on to the sheet. Right click the button and choose Assign macro and point to GetOutlookMail. -- Dick Kusleika MVP - Excel Excel Blog - Daily Dose of Excel www.dicks-blog.com "Stift " wrote in message ... Owwk, I understand the code. It need some adjustments but I think that I can fix that. Problem is more.Where do I have to set te code ? I want that when I open the excelfile, he will perform this action automattically(so I don't need a button)! Hope you can help me --- Message posted from http://www.ExcelForum.com/ |
Import data from a Outlook mail in excel
|
All times are GMT +1. The time now is 01:53 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com