My set up is OL 2010 in an exchange environment.
I learnt / tweaked from the following:
Search for messages from contact macro
and ended with this:
I am trying to save this as a Search Folder. Is that possible?
Any other way to create a search folder using Instant Search logic?
I learnt / tweaked from the following:
Search for messages from contact macro
and ended with this:
Code:
Sub SearchMG()
Dim myOlApp As New Outlook.Application
Dim ns As Outlook.NameSpace
Dim strFilter As String
Dim oMail As Outlook.MailItem
Set ns = myOlApp.GetNamespace("MAPI")
Set myOlApp.ActiveExplorer.CurrentFolder = ns.GetDefaultFolder(olFolderInbox)
txtSearch = "from:(Email name) OR to:(Email name) OR cc:(Email name) AND followupflag:followup flag"
myOlApp.ActiveExplorer.Search txtSearch, olSearchScopeAllFolders
Set myOlApp = Nothing
End Sub
I am trying to save this as a Search Folder. Is that possible?
Any other way to create a search folder using Instant Search logic?