Print most recent email with same subject.

G

Guest

Hello.

I have never programed a macro in for outlook, but I am reasonably
experienced with programing VB for use in excel.

At any rate... is there a way to print all of the most recent emails in a
folder that have the same subject?

Goal: I have a few hundered emails that I would like to print, and many of
them are just strings "back and forth correspondence" regarding the same
subject. I know that if I print the most recent of the string, all of the
previous messages are included at the bottom. However, I do not have the
time to manually find the most recent email.

Any help would be great. Thanks.
 
M

Michael Bauer [MVP - Outlook]

For one specific subject that could look like this:

Dim Folder as Outlook.Mapifolder
Dim Items as Outlook.Items
Dim restricted as Outlook.Items

set Folder=Application.Session.GetDefaultFolder(olFolderInbox)
Set Items=Folder.Items

Set Restricted=Items.Restrict("[Conversation]=" & chr(34) & "Subject here" &
chr(34)
If Restricted.Count Then
Restrict.Sort "[ReceivedTime"], True
Restricted(1).PrintOut
Endif

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
Quick-Cats - Categorize Outlook data:
<http://www.vboffice.net/product.html?id=2006063&cmd=detail&lang=en&pub=6>

Am Thu, 24 May 2007 11:13:01 -0700 schrieb ToddEZ:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top