none
Outlook Add-In that uses public folders and Exchange Online scenario RRS feed

  • Question

  • Hi,

    I 'd like to know whether a VSTO add-in for Outlook (2007, 2010, 2013) that uses Exchange Server's public folders to do its work, will still be able to work (reference public folders, send emails, fire events etc. the same way as before) in an Exchange Online scenario, where the user mailbox and public folder store is on the cloud.

    Does anyone have any experience / knowledge on this?

    Thank you in advance,

    Jason Orphanidis


    Jason Orphanidis

    Wednesday, February 12, 2014 9:16 AM

Answers

All replies

  • Hello Jason,

    Sure. VSTO add-ins should work as expected. Online Mode works by using information directly from the server, and, as the name implies, it requires a connection. Mailbox data is only cached in memory and never written to disk. I have just found a similar forum thread you may be interested in: Using Outlook with Exchange Online with non-cache mode.

    However, be aware of the known issues with Exchange Online mode - Exchange 2010 and Outlook 2003: ItemAdd event does not fire in online mode .



    Wednesday, February 12, 2014 12:57 PM
  • The problem with ItemAdd() is only with Outlook 2003 and Exchange 2010. It doesn't affect the Outlook versions specified (2007, 2010, 2013).

    Even with Exchange in the cloud one can set up a cached Exchange profile in Outlook. It should be no different than an on-premises Exchange server.


    Ken Slovak MVP - Outlook

    Wednesday, February 12, 2014 3:18 PM
  • Hi Eugene,

    I think I wasn't very clear with what I mean "Exchange Online". I mean the scenario where you get Exchange services via an Office 365 subscription (cloud Office so to speak). This is called Exchange Online as a product.


    Jason Orphanidis

    Wednesday, February 12, 2014 3:21 PM
  • Hi Jason,

    Thank you for the clarification. In that case it will be a regular POP or IMAP protocol. There is nothing to worry about.


    Wednesday, February 12, 2014 3:29 PM
  • Actually the protocol for connecting to Exchange as part of Office 365 is a normal Exchange connection.

    You can connect using IMAP if that's set up on the server, but usually connections would use an online or cached connection to mailboxes or public folder mailboxes just as if the server was in-house.


    Ken Slovak MVP - Outlook

    Wednesday, February 12, 2014 3:42 PM
  • Keep in mind that as of Exchange 2010 Public Folders store is not installed by default.

    Office 365 mailboxes do not have Public Folders by default, you need create a Public Folders mailbox.


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Wednesday, February 12, 2014 4:49 PM
  • So I can assume that

    Outlook.MAPIFolder folder = Globals.ThisAddIn.Application.Session.GetDefaultFolder(Outlook.OlDefaultFolders.olPublicFoldersAllPublicFolders);
    

    will get me the public folder root (assuming the public folder mailbox store exists)?

    Thanks,

    Jason


    Jason Orphanidis

    Wednesday, February 12, 2014 5:58 PM
  • Wednesday, February 12, 2014 6:15 PM
  • Thanks that's what I needed to know.

    Regarding the article you linked, I think it's a bad advice. I posted my objections there under the comments.


    Jason Orphanidis

    Wednesday, February 12, 2014 6:51 PM
  • It's more illustrative than anything, certainly the English only nature of the naming limits it. However where more than 1 Exchange account is configured on different EX servers the information is actually accurate as far as I'm aware.

    Ken Slovak MVP - Outlook

    Wednesday, February 12, 2014 7:01 PM
  • You will have better luck with PR_MDB_PROVIDER property - you can loop through all stores and read the PR_MDB_PROVIDER property (DASL name http://schemas.microsoft.com/mapi/proptag/0x34140102) using Store.PropertyAccessor.GetProperty. If you get pbExchangeProviderPrimaryUserGuid (5494A1C0297F101BA58708002B2A2517), you have a PF store.

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Wednesday, February 12, 2014 7:07 PM
  • @Dmitry, trying to understand why to loop all the stores: are you talking about a general case where there are more than 1 public folder stores? Multiple Exchange accounts from different servers?

    @Ken, now that you wrote "on different EX servers" I got the jist of the article. It wasn't clear as I read it and I thought it meant something like additional mailboxes (from the same server).


    Jason Orphanidis

    Wednesday, February 12, 2014 7:23 PM
  • Yes, I meant multiple Exchange accounts. If you only have one, things are much easier.

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Wednesday, February 12, 2014 7:26 PM
  • As Dmitry indicated, things get more complicated with more than 1 Exchange server and account in the mix.

    In that case something like NameSpace.GetDefaultFolder() would best be replaced by Store.GetDefaultFolder().

    You can iterate the Stores collection to get each loaded Store, and get NameSpace.DefaultStore to help you navigate around. Store.ExchangeStoreType can be used to determine the type of each store: http://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook.olexchangestoretype.aspx


    Ken Slovak MVP - Outlook

    Wednesday, February 12, 2014 7:43 PM
  • Thank you both!


    Jason Orphanidis

    Wednesday, February 12, 2014 7:49 PM
  • I can be wrong about Exchange, but Office 365 provides the following protocols for connecting Outlook:

    • IMAP
    • POP3
    • SMTP

    You can read more about these settings in the Set up your Office 365 or other Exchange-based email in Outlook 2010 or Outlook 2013 article.

    Thursday, February 13, 2014 1:37 PM
  • Why would you want to use POP3 or IMAP4 when connecting to an Exchange mailbox and are using Outlook?

     

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Thursday, February 13, 2014 1:42 PM
  • I think Eugene is worried that POP and IMAP are the only protocols for Outlook connectivity, which I believe they are not!


    Jason Orphanidis

    Thursday, February 13, 2014 1:55 PM
  • Good catch :)

    Thursday, February 13, 2014 1:56 PM
  • Outlook in general provides those means of connecting to an ISP, that's been true for many years and has nothing to do with Office 365. Outlook also provides connection to Exchange server and if connecting to Exchange that's usually the preferred method.

    Ken Slovak MVP - Outlook

    Thursday, February 13, 2014 3:47 PM