How to find all emails from and to a contact in OL 2019

witzker

Senior Member
Outlook version
Outlook 2010 32 bit
Email Account
POP3
Hi
changed from OL 2010 to 2019 now

The function to get emails to and from a contact displayed in a list has been removed in 2019?
It was slow in 2010 but useful.

How to get this feature back?

I have a contact open - and want to see what mails have been sent or received from this contact.
I hope you know what I mean?

Is there already a solution for this?

Would you in the forum consider this as a useful feature?
What do you think?
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
The activities and people pane are gone from outlook 2019 - you can use instant search - or a macro to automate it.
Use Instant search to find messages from a contact

Both were useful - I really liked the people pane (a feature of the social connector) - you could view recent messages for any recipient on any message.
 

witzker

Senior Member
Outlook version
Outlook 2010 32 bit
Email Account
POP3
THX

Think that's what I need:
I open a contact and run the macro

Code:
Sub SearchByAddress()

Dim myOlApp As New Outlook.Application
Dim ns As Outlook.NameSpace
Dim strFilter As String
Dim oContact  As Outlook.ContactItem

Set ns = myOlApp.GetNamespace("MAPI")

Set oContact = ActiveExplorer.Selection.item(1)

' use oContact.FullName to search on the name
strFilter = oContact.Email1Address
 
Set myOlApp.ActiveExplorer.CurrentFolder = ns.GetDefaultFolder(olFolderInbox)

txtSearch = "from:" & strFilter
myOlApp.ActiveExplorer.Search txtSearch, olSearchScopeAllFolders

Set myOlApp = Nothing

End Sub

But I need to look too in all subfolders of inbox!
Can you help, pls?
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
The search scope should be all folders.
olSearchScopeAllFolders

if you want just the inbox and its subfolders, use
olSearchScopeSubfolders
 

witzker

Senior Member
Outlook version
Outlook 2010 32 bit
Email Account
POP3
THX now i use the macro to search for all emailadresser of an contact from: OR to:

I open the contact run the macro - WORX
I open another contact run the macro - all Items in Inbox are shown & !!
1635069208078.png

the "to" is marked in mails that contain "to" like tobias

Here is what I have:
Code:
Sub T_SearchByAddress()
 
Dim myOlApp As New Outlook.Application
Dim ns As Outlook.NameSpace
Dim strFilter As String
Dim oContact  As Outlook.ContactItem
 
Set ns = myOlApp.GetNamespace("MAPI")
 
Set oContact = ActiveExplorer.Selection.Item(1)
 
' use oContact.FullName to search on the name
strFilter = Chr(34) & oContact.Email1Address & Chr(34)

If oContact.Email2Address <> "" Then
strFilter = strFilter & " OR " & Chr(34) & oContact.Email2Address & Chr(34)
End If

If oContact.Email3Address <> "" Then
strFilter = strFilter & " OR " & Chr(34) & oContact.Email3Address & Chr(34)
End If
 
Set myOlApp.ActiveExplorer.CurrentFolder = ns.GetDefaultFolder(olFolderInbox)

txtSearch = "from:(" & strFilter & ") OR to:(" & strFilter & ")"
myOlApp.ActiveExplorer.Search txtSearch, olSearchScopeAllFolders
 
Set myOlApp = Nothing
 
End Sub
 

witzker

Senior Member
Outlook version
Outlook 2010 32 bit
Email Account
POP3
Pls. Forget the above!! (it was too late to be able to delete the post above)
I found your macro here:

Can you Pls help to sort the results, NOT like it is: IN FOLDER
I would like to have it sorted To DATE - youngest in top.

THX great.
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
You would need to change the view using VBA - i'll take a look, but you can change the sort order in the search results. If you save it as a new view, it is usually applied to search results.
 
Similar threads
Thread starter Title Forum Replies Date
S How to find emails that I sent that have not received a reply? Using Outlook 7
L Moving emails with similar subject and find the timings between the emails using outlook VBA macro Outlook VBA and Custom Forms 1
B Find Related Emails to sender Using Outlook 1
C Cant find emails after moving pst Using Outlook 1
K Use VBA to find Sender and Recipient from Microsfot 365 Journaled Email Items Outlook VBA and Custom Forms 3
M How can we find the list of users who are members of a deleted distribution list? Exchange Server Administration 2
N Disable Auto Read Receipts sent after using Advanced Find Using Outlook 4
H Outlook 2003 find by "has attachment" Using Outlook 1
geoffnoakes Find Contacts with UDFs "in this item" Using Outlook 1
B Outlook 2010 Can not find a certain file in M/S Outlook 2010. Using Outlook 1
T "cannot find the calendar folder for this item" - calendar items stuck in outbox Using Outlook 0
S Find a cell value in excel using outlook vba Using Outlook 1
B Looking to filter (or just find/search) for only messages that the sender has sent more than 1 messa Using Outlook 2
B Search: Cannot find which Folder Contains a Message Using Outlook 3
K How to find specific header and copy the mail body Using Outlook 0
Hudas VBA find and open an email without looping thru each email in the inbox Outlook VBA and Custom Forms 1
E How to find or recover Lost e-mails within a folder under Inbox? Using Outlook 2
H "Advanced find: column for full folder path? Using Outlook 1
M What is the best way to find all records of an e-mail for our company? Outlook VBA and Custom Forms 2
C Find all deleted recurrence appointments Outlook VBA and Custom Forms 4
mrje1 Is there a Find and Replace feature in Outlook 2016? Using Outlook 4
G Can't find contacts entered Using Outlook 0
Connie Boyer Exporting Outlook calendar/find next repeating meeting Using Outlook 3
B Find related messages to sender Outlook VBA and Custom Forms 7
RBLampert Outlook "can't find" my e-mail server to receive messages Using Outlook 22
M Can't find messages Using Outlook 4
Diane Poremsky Find the Distribution Lists a Contact Belongs to Using Outlook 0
T Macro to find contacts by category and copy them to another folder Outlook VBA and Custom Forms 15
thomas zaleski Cannot find the Sending FOlder Using Outlook 2
J Find and Highlight text in outlook Outlook VBA and Custom Forms 4
J Outlook Mailbox cleanup; any way to change limit to find items older 999 days? Exchange Server Administration 2
F Disable "Find related messages" Using Outlook 1
Jennifer Murphy Can't delete or even find task attachment Using Outlook 1
K Re: Use Instant search to find messages from a contact Outlook VBA and Custom Forms 6
Andrew Hawkins "Advanced Find" Using Outlook 1
M BCM 2007 Can't find SS2012Express Using Outlook 2
O Outlook 2013 contacts - Where to find "Display as"-field Using Outlook 2
A Advanced find query facilty Help please Using Outlook 2
G Find Organizer of appointment Using Outlook 2
R writing "Instant Search" queries to find User-Defined fields Using Outlook 0
P Outlook Advanced Find Using Outlook 0
S Advanced Find text field limits Using Outlook 2
C O2010: Using Advanced Find to locate exact queries Using Outlook 3
D Outlook 2007 Find All Related and Messages From Sender not working Using Outlook 3
V Advanced Find - [Today]-3 ? Using Outlook 4
S Cannot Find Shared Database on Remote Computer BCM (Business Contact Manager) 13
V rule to Find some words in the subject, change subject then forward Using Outlook 1
L Mapi folder.FIND: error Using Outlook 0
T Find the sender who sent the mail from Generic Mailbox. Using Outlook 4
S Can't find some addresses after a contact list export. Using Outlook 1

Similar threads

Top