Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Picking up E-Mail Details
Hi,
I'm trying to write a macro within a spreadsheet which picks up details whenever a mail is sent to any of my Folders (Microsoft Outlook) So my Columns a From Subject Time Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Picking up E-Mail Details
I suggest this would be easier to approach by placing code within
Outlook to trap new email, updating the spreadsheet on that event. Trying to control Outlook from Excel is feasible but fraught with problems due to the security messages every ten minutes or so when you access the mail properties etc. To start you off, I would go into Outlook's VBE and look at the NewMail event. You need something like the below in the ThisOutlookSession module. Sub Application_NewMail() 'Go through each new message 'Write details to Excel 'Loop End Sub This would probably be more appropriate for the Outlook VBA newsgroup: microsoft.public.outlook.program_vba You may find this useful too http://msdn.microsoft.com/library/de...pplication.asp With respect to the updating Excel part of your code. This can be achieved by accessing Excel through OLE, opening your workbook (if not open) and writing the required data. However, if you don't need formatting of the worksheet, I would recommend writing to a CSV file directly from Outlook. This is far simpler, quicker and can still be easily opened in Excel. HTH, Gareth teresa wrote: Hi, I'm trying to write a macro within a spreadsheet which picks up details whenever a mail is sent to any of my Folders (Microsoft Outlook) So my Columns a From Subject Time Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
mail merge not picking up state for address labels from excel spr | Charts and Charting in Excel | |||
Picking values out | Excel Worksheet Functions | |||
Picking data | Excel Worksheet Functions | |||
picking data | Excel Programming | |||
Picking Teams | Excel Programming |