Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Outlook and VBA (http://www.outlookbanter.com/outlook-vba/)
-   -   Print most recent email with same subject. (http://www.outlookbanter.com/outlook-vba/49012-print-most-recent-email-same.html)

ToddEZ May 24th 07 08:13 PM

Print most recent email with same subject.
 
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.

Michael Bauer [MVP - Outlook] May 25th 07 06:55 AM

Print most recent email with same subject.
 


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(olFold erInbox)
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:

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.



All times are GMT +1. The time now is 08:52 PM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com