A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Outlook Mail Log



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old January 5th 07, 11:01 AM posted to microsoft.public.outlook.program_vba
Varun Nair
external usenet poster
 
Posts: 2
Default Outlook Mail Log

HI,

My agents receive data in their mail boxes and i need to calculate their
Cycletime on each mail. SO i want to track the mails in their inbox and sent
items.

I was looking for a macro which could generate an excel sheet which contians
all the information of mails in my inbox.
Information as in Subject, Sender etc.


--
Varun Nair

Ads
  #2  
Old January 5th 07, 11:19 PM posted to microsoft.public.outlook.program_vba
Eric Legault [MVP - Outlook]
external usenet poster
 
Posts: 830
Default Outlook Mail Log

How about copying all the messages in the folders and pasting them into an
Excel spreadsheet? You'll see the same view fields replicated as column
headers and it should just like the message list.

Otherwise, you can use something like this:

Sub OutputSelectedMessagesToExcel()
Dim myOlExp As Outlook.Explorer
Dim MyOlsel As Outlook.Selection
Dim objItem As Object

Dim objWkb As Object 'Excel.Workbook
Dim objWks As Object 'Excel.Worksheet
Dim objExcel As Object 'Excel.Application
Dim i As Integer, j As Integer

Set myOlExp = Application.ActiveExplorer
Set MyOlsel = myOlExp.Selection

'Set objExcel = New Excel.Application
Set objExcel = CreateObject("Excel.Application")
Set objWkb = objExcel.Workbooks.Add
Set objWks = objExcel.ActiveSheet

objWks.Cells(1, 1).Value = "Subject"
objWks.Cells(1, 2).Value = "Received"
objWks.Cells(1, 3).Value = "Sender Name"
objWks.Cells(1, 4).Value = "Email"
For i = 1 To MyOlsel.Count
Set objItem = MyOlsel.Item(i)
objWks.Cells(i + 1, 1).Value = objItem.Subject
objWks.Cells(i + 1, 2).Value = objItem.ReceivedTime
objWks.Cells(i + 1, 3).Value = objItem.SenderName
objWks.Cells(i + 1, 4).Value = objItem.SenderEmailAddress
Set objItem = Nothing
Next

objExcel.Visible = True
Set objWks = Nothing
Set objExcel = Nothing
Set objWkb = Nothing
Set myOlExp = Nothing
Set MyOlsel = Nothing
End Sub

--
Eric Legault (Outlook MVP, MCDBA, MCTS: Messaging & Collaboration)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


"Varun Nair" wrote:

HI,

My agents receive data in their mail boxes and i need to calculate their
Cycletime on each mail. SO i want to track the mails in their inbox and sent
items.

I was looking for a macro which could generate an excel sheet which contians
all the information of mails in my inbox.
Information as in Subject, Sender etc.


--
Varun Nair

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to log onto incoming mail server. Marisa Outlook - Installation 2 November 2nd 06 11:45 PM
Unable to locate pop3.log smtp.log in jean Outlook Express 3 October 8th 06 01:58 PM
Junk Mail Filter Deletion Log? - Outlook - General Queries 2 June 18th 06 05:41 AM
Unable to log onto incoming mail server John S Outlook - Installation 1 June 5th 06 01:10 PM
Unable to log on to incoming mail server (POP3) - new account Sharon Dowling Outlook - General Queries 0 January 20th 06 10:24 PM


All times are GMT +1. The time now is 06:52 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.