Finding messages by conversation macro

  • Thread starter Thread starter Nagua
  • Start date Start date
Status
Not open for further replies.
N

Nagua

I am familiar with some VBA macro writing in Word but no nothing for how to

do this in Outlook. I am trying to accomplish the following:

Find all email messages, by conversation, after I reply to a message with a

certain phrase and move it to Folder named Completed Work.

I attempted to run a rule, but I need to run a script within the rule to

complete the "find messages by conversation" part.

Can this be accomplished and how?

Thanks!
 
You would use a Find or Restrict on the Items collection of each folder

where you wanted to find those related items. The property to filter on is

the ConversationTopic property.

How you get a folder reference for something like Completed Work depends on

where it's located in the folder tree. Let's say the filter is just for

Inbox, code would look something like this:

Sub GetConversationItems(Item As MailItem)

Dim oFolder As Outlook.MAPIFolder

Dim colItems As Outlook.Items

Dim colFiltered As Outlook.Items

Set oFolder = Application.Session.GetDefaultFolder(olFolderInbox)

Set colItems = oFolder.Items

Set colFiltered = colItems.Restrict("[ConversationTopic]='" &

Item.ConversationTopic & "'")

' now you have the items in that conversation, do something with them

End Sub

"Nagua" <Nagua> wrote in message

news:4A25F6C3-AB37-4D6F-910B-5736FCFE1FB5@microsoft.com...
> I am familiar with some VBA macro writing in Word but no nothing for how to
> do this in Outlook. I am trying to accomplish the following:

> Find all email messages, by conversation, after I reply to a message with
> a
> certain phrase and move it to Folder named Completed Work.

> I attempted to run a rule, but I need to run a script within the rule to
> complete the "find messages by conversation" part.

> Can this be accomplished and how?

> Thanks!

>
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
H Finding text in open email Outlook VBA and Custom Forms 12
bhamberg Finding a rouge rule... Using Outlook 6
K Outlook.com is not showing, or finding via search, all my Contacts (People) Using Outlook 0
A ScanPST finding errors but no Repair button Using Outlook 2
F Finding Meetings/Tasks in a date range Using Outlook 1
M Finding Tasks in Outlook 365 Using Outlook 1
A "search people" not finding all contacts Using Outlook 17
Commodore Finding items from last 7 days Using Outlook 2
T Need help with finding/updating task Outlook VBA and Custom Forms 1
M Finding a folder by name Outlook 2013 Using Outlook 4
S Finding Distribution List Name Outlook VBA and Custom Forms 3
Ron Kirschner Finding a rule Using Outlook 1
A OL13 Calendar Search not finding most items Using Outlook 15
L Finding deleted contact from shared folder. Exchange Server Administration 1
G finding Outlook 2010 pst in Windows XP Using Outlook 2
P finding a folder containing an email item Using Outlook 0
S Finding an inbox email question Outlook VBA and Custom Forms 2
C Finding an email address based on a name Outlook VBA and Custom Forms 7
M Outlook VBA Form not finding FOR LOOP -- Error message Outlook VBA and Custom Forms 2
R Re-download past messages Using Outlook 3
S Related messages show in main Outlook window vice new Advanced Find windows Using Outlook 1
mrrobski68 Issue with Find messages in a conversation macro Outlook VBA and Custom Forms 1
N Reply to Outlook messages by moving messages to a specific Outlook folder Outlook VBA and Custom Forms 1
B Modify VBA to create a RULE to block multiple messages Outlook VBA and Custom Forms 0
G Question marks in messages Using Outlook 2
L How Stop Outlook Nag Messages Using Outlook 1
C Trying to move messages between imap accounts/folders Using Outlook 5
e_a_g_l_e_p_i Question about installing my Gmail account on my iPhone but still getting messages downloaded to my desktop Outlook. Using Outlook 3
P now on office 365 but getting error messages about missing Outlook 2013 cache folders Using Outlook 2
D Outlook 365 Forward Meeting Related Messages to Specific Meeting Organizer Outlook VBA and Custom Forms 0
V Macro to count flagged messages? Using Outlook 2
G Automatically delete messages in the synchronization folder Outlook VBA and Custom Forms 3
B IMAP server rejects sent email - cannot deliver messages Using Outlook 2
J Deliver new messages to New or Existing Data File? Using Outlook 2
M Messages Intermittently Dont Arrive In Sent Items After Sending Successfully Using Outlook 4
N Save selected messages VBA does not save replies and/or messages that contain : in subject Outlook VBA and Custom Forms 1
Travis Lloyd Messages Won't Display In Outlook 2019 Home & Business Using Outlook 0
M White square in body of Outlook Messages (O2016 Version 2012 32bit Click To Run) Using Outlook 4
R Why doesn't outlook use "Normal" style for new messages? Using Outlook 4
S Customize the autocolor font choices for replying/forwarding messages Outlook VBA and Custom Forms 2
B User defined field for messages with 'me' in the [To], [Cc] line Using Outlook 0
R Outlook Autoforward rule do not work for NDR messages Using Outlook 1
S Conditional Formatting for messages in a Conversation thread Using Outlook 1
GregS Outlook 2016 Sent Items vs Sent Messages Using Outlook 2
S Messages moved / deleted by auto-archive are not synchronized to exchange Exchange Server Administration 8
A Create date folder and move messages daily Outlook VBA and Custom Forms 1
ChrisK2 Send email to advertise@slipstick.com fails: "The group advertising isn't set up to receive messages from..." Using Outlook 3
J Outlook 2007 Hide Messages Option not Available Using Outlook 2
D Outlook 2016 customization of incoming messages Using Outlook 1
O Rule to move (specific) messages from Sent folder to Specific folder Using Outlook 1

Similar threads

Back
Top