Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create a LOG file from Inbox list of MsOutlook

Status
Not open for further replies.

luckyluci

Structural
Aug 21, 2001
13
I want to create an LOG file using the structure "From, Subject, Received Date" from MsOutlook software INBOX, as you could see if you tray to print the panel with option "File>Print>Table Style>all rows>Preview". How shall I proceed?
Otherwise I should copy & paste from each email the above-mentioned values to an excel file, and is a lot of work!!!
Thank you!
 
Replies continue below

Recommended for you

You can write a macro in Outlook VBA. This should get you started:

Code:
Private Sub Application_NewMail()
Dim MI As MailItem
Dim MF As MAPIFolder
Dim fs, f
    Set fs = CreateObject("Scripting.FileSystemObject")
    Set f = fs.OpenTextFile("c:\test.txt", 8, 0)
Set MF = GetNamespace("MAPI").GetDefaultFolder(olFolderInbox)
For Each MI In MF.Items
f.Write MI.SenderName & "  " & MI.Subject & "  " & MI.ReceivedTime & vbCrLf
Next
f.Close
End Sub

This still needs some work, and it assumes the existence of the text file. It's currently fired when a new email arrives, but should be enough to get you started.

Good Luck
johnwm
________________________________________________________
To get the best from these forums read faq731-376 before posting

UK steam enthusiasts:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor