Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 169
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 158
Default 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
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
mail merge not picking up state for address labels from excel spr awebb Charts and Charting in Excel 0 August 4th 06 10:34 PM
Picking values out Jez Excel Worksheet Functions 1 April 6th 06 10:18 AM
Picking data Tudor Excel Worksheet Functions 2 June 14th 05 11:16 AM
picking data axg275 Excel Programming 0 August 7th 04 07:44 PM
Picking Teams Bigjayce[_3_] Excel Programming 1 February 9th 04 04:51 PM


All times are GMT +1. The time now is 10:34 PM.

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

About Us

"It's about Microsoft Excel"