none
GetRules() dose not work properly. RRS feed

  • Question

  • I'm developing Outlook addin with VSC++.
    When I call GetRules() in OnConnection event, GetRules() does not work properly.
    This is not always happens, but when it happens, GetRules() returns -2147467259.
    It only occurred at Outlook2016.
    I can see this problem in the Outlook Spy too.(Call GetRules right after starting outlook)
    Also, I will try in OnStartupComplete event, but still GetRules() sometimes returns error.

    How can I get rules when Outlook starts up.
    Friday, June 15, 2018 6:45 AM

All replies

  • Hello,

    Do you have an Exchange account configured in Outlook?

    If so, try to use the online mode. Do you still get an exception in the code?


    profile for Eugene Astafiev at Stack Overflow, Q&A for professional and enthusiast programmers

    Saturday, June 16, 2018 12:28 AM
  • Hi Eugene.

    Yes, I have an Exchange account both cache / online mode.

    As you say, I could use the GetRules() in the online mode, but I want use GetRules() in the cached Exchange mode too.

    Thursday, June 21, 2018 5:42 AM
  • The interface required for that call is not supported in the cached mode. You must use the online mode or just open the store in the online mode (it is possible only with Extended MAPI).

    profile for Eugene Astafiev at Stack Overflow, Q&A for professional and enthusiast programmers

    Thursday, June 21, 2018 7:28 AM