Issue an SQL query or similar, to Outlook database?

Posted on 2011-10-12
Last Modified: 2012-05-12
I need to search for and delete all contacts with a particular company name, from my Outlook address book. Can I issue a query to fish out these contacts?
Question by:bobox00
    LVL 59

    Accepted Solution


    Typically, if needing to do Outlook automation, I would think VBA within Outlook or .NET using the Outlook library. However, if we are talking Outlook 2007 as an example, you can just go to Contacts, change to the By Company view, and click Delete key with the Company name you want highlighted. It will delete all contacts under that group once you confirm prompt to make sure you are aware of this bulk action.

    If you really want to interact with this via SQL, then see if this project helps give you an example. It shows how to synchronize contacts via Outlook and SQL Server, so you could technically manage contacts via SQL scripts and then just push back to Outlook.

    Hope that helps!


    Author Closing Comment

    Thanks! After changing the List view, I right-clicked and went to options. Then I was able to add the Modified column, sort by it and delete the contacts I needed to get rid of.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    Email Attachment -- internal server "record keeping" ? 3 38
    Outlook shows "Working Offline". 2 24
    exchange 2007 2 23
    EWS vs OWA 10 26
    Read about achieving the basic levels of HRIS security in the workplace.
    Shadow IT is coming out of the shadows as more businesses are choosing cloud-based applications. It is now a multi-cloud world for most organizations. Simultaneously, most businesses have yet to consolidate with one cloud provider or define an offic…
    Video by: Steve
    Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now