简体   繁体   中英

Outlook 2016 Interop/C#: How to programmatically get around “Click here to view more on Microsoft Exchange”

I have a program that needs to access all the emails in a users mailbox. However, unless the "Click here to view more..." link at the bottom of each mailbox is clicked, some messages will be skipped. Is there a way around this? I'm using C# and Outlook.Interop. Thanks in advance.

This happens because the OST file will only store the specified number of days/months worth of messages. You can either

  1. Reset the option in the Exchange account properties dialog - move slider all the way to the right
  2. Turn cached mode off completely to always open the mailbox in the online mode (Outlook will be noticeably slower).
  3. Use Extended MAPI (C++ or Delphi only) or Redemption (any language) to open the folder in the online mode using the MAPI_NO_CACHE flag. You can play with that flag in OutlookSpy - click IMAPIFolder button, select the PR_ENTRYID property, right click, select IMAPISesion::OpenEntry , make sure MAPI_NO_CACHE bit is checked. When using Redemption, call RDOSession . GetFolderFromID() and specify the MAPI_NO_CACHE flag.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM