×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Create a LOG file from Inbox list of MsOutlook

Create a LOG file from Inbox list of MsOutlook

Create a LOG file from Inbox list of MsOutlook

(OP)
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!

RE: Create a LOG file from Inbox list of MsOutlook

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: www.essexsteam.co.uk

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources