Outlook 2007 Macro Search Contacts

Status
Not open for further replies.

LMS

Senior Member
Outlook version
Outlook 2007
Email Account
Exchange Server
I want a macro that searches all contacts of all folders and sub folders and sub sub folders etc....based on the words of a certain field of the contact form. So if go to the search area and add a criteria of that field, and put in the words, it searches all contacts....so there is code that can do the same thing so I create a list of search codes for certain areas..
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange

LMS

Senior Member
Outlook version
Outlook 2007
Email Account
Exchange Server
I am still listening to the Smart Woman!!!:)

I need the code that can post.....my contact form I use is named: Contact Form 1 and the new field I created is a field name of "LinkedIn" and the words I put in the field is simply LinkedIn Contact.....so can you please send me the form of the code that changes it to the contacts and the field that I am search from as I don't know what to do from your link you just sent....thanks so so much!!!
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
You'll have to wait - i need to finish my newsletter tonight and we're going away for the weekend.
 

LMS

Senior Member
Outlook version
Outlook 2007
Email Account
Exchange Server
I will wait to hear back as soon as possible.
 

LMS

Senior Member
Outlook version
Outlook 2007
Email Account
Exchange Server
I will wait to hear back as soon as possible.
 

LMS

Senior Member
Outlook version
Outlook 2007
Email Account
Exchange Server
As it turns out, I looked at your Category search code and created it...and changed to the LinkedIn Folder and here is what I did, and it did it!!!
Sub SearchByLinkedInContacts()
Dim myOlApp As New outlook.Application
txtSearch = "[LinkedIn]:(LinkedIn Contact)"
myOlApp.ActiveExplorer.Search txtSearch, olSearchScopeAllFolders
Set myOlApp = Nothing
End Sub
 

LMS

Senior Member
Outlook version
Outlook 2007
Email Account
Exchange Server
To the Smart Woman!!!:)

Is there a way to change that code so it only searches the Folder that I am in, not all folders?

That would be wonderful right away, as I have set up a search process for business purposes.
 

LMS

Senior Member
Outlook version
Outlook 2007
Email Account
Exchange Server
:)And just found it through your other area again:

myOlApp.ActiveExplorer.Search txtSearch, solSearchScopeCurrentFolder

Wonderful!!:)
 
Status
Not open for further replies.
Top