none
In an Outlook add-in, is there a way to access email (and other info) in a non-default PST (or other non-default data store)? RRS feed

  • Question

  • We have an Outlook add-in built in VS2010 using VSTO 2010, targeting Outlook 2007 and 2010.  The add-in currently accesses information in the default data store.  We have some users that have multiple data stores (multiple PSTs, Exchange + one or more PST, etc).  How would I access the data in these non-default stores from the add-in?

    mdpowers

    Monday, October 8, 2012 8:40 PM

Answers

  • No, that's for the default account. You can however sink the ItemAdd() event on the Items collection of any of the folders in any of the Stores.

    --
    Ken Slovak
    [MVP-Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
    "mdpowers-slo" <=?utf-8?B?bWRwb3dlcnMtc2xv?=> wrote in message news:45c2e34d-6792-4cc0-b995-e61959ddc605...
    Would I be able to attach to the events such as "NewMail" on the other stores? 

    mdpowers


    Ken Slovak MVP - Outlook
    Tuesday, October 9, 2012 6:19 PM

All replies

  • Iterate the Stores collection and read whatever data from whatever folder and items you want from each Store object.

    --
    Ken Slovak
    [MVP-Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
    "mdpowers-slo" <=?utf-8?B?bWRwb3dlcnMtc2xv?=> wrote in message news:3cb066a3-58d4-4db4-be2c-7a9b7b47db71...
    We have an Outlook add-in built in VS2010 using VSTO 2010, targeting Outlook 2007 and 2010.  The add-in currently accesses information in the default data store.  We have some users that have multiple data stores (multiple PSTs, Exchange + one or more PST, etc).  How would I access the data in these non-default stores from the add-in?

    mdpowers


    Ken Slovak MVP - Outlook
    Monday, October 8, 2012 8:59 PM
  • Would I be able to attach to the events such as "NewMail" on the other stores? 

    mdpowers

    Monday, October 8, 2012 9:20 PM
  • No, that's for the default account. You can however sink the ItemAdd() event on the Items collection of any of the folders in any of the Stores.

    --
    Ken Slovak
    [MVP-Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
    "mdpowers-slo" <=?utf-8?B?bWRwb3dlcnMtc2xv?=> wrote in message news:45c2e34d-6792-4cc0-b995-e61959ddc605...
    Would I be able to attach to the events such as "NewMail" on the other stores? 

    mdpowers


    Ken Slovak MVP - Outlook
    Tuesday, October 9, 2012 6:19 PM