none
How to use VSTO to control outlook2007 receive email? RRS feed

  • Question

  • As default, each account will automatic receive email every 30 Min,

     

    But i want to use VSTO to control it.

    for example:

    two button on myself form,

    when i click buttonA, accountA will start receive email,

    when i click buttonB, accountB will start receive email.

     

    is anybody have some idear?

    Thanks very much!

     

    Friday, November 11, 2011 2:38 AM

Answers

  • Hello,

    To start send/recieve operation programmatically, you call SyncObject.Start(), see SyncObject Interface.

    In the Outlook UI, you can find the control labelled Send/Receive Groups; there's also Define Send/Receive Groups. These allow you to create groups containing any combination of accounts. This can be done in the UI only because the SyncObjects collection (it holds all such groups) doesn't allow creating a new SyncObject; also, you cannot modify existing SyncObject objects. 


    Regards from Belarus (GMT + 2),

    Andrei Smolin
    Add-in Express Team Leader
    Friday, November 11, 2011 6:43 AM

All replies

  • As default, each account will automatic receive email every 30 Min,

     

    But i want to use VSTO to control it.

    for example:

    two button on myself form,

    when i click buttonA, accountA will start receive email,

    when i click buttonB, accountB will start receive email.

     

    is anybody have some idear?

    Thanks very much!

    • Moved by Dummy yoyoModerator Monday, November 14, 2011 2:13 AM Take a look at the thread: http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/dacd8761-15cd-4d89-8791-fc54ae2e4191/#dacd8761-15cd-4d89-8791-fc54ae2e4191 (发件人:Visual C#)
    • Merged by Sheng Jiang 蒋晟 Monday, November 14, 2011 8:13 PM
    Thursday, November 10, 2011 2:46 AM
  • Suggest co-posting/moving to VSTO forum.
    Mark Zhou
    Thursday, November 10, 2011 3:02 AM
  • where is "VSTO forum"?

    can you give me a link?

    Tks

    Thursday, November 10, 2011 3:22 AM
  • Hello,

    To start send/recieve operation programmatically, you call SyncObject.Start(), see SyncObject Interface.

    In the Outlook UI, you can find the control labelled Send/Receive Groups; there's also Define Send/Receive Groups. These allow you to create groups containing any combination of accounts. This can be done in the UI only because the SyncObjects collection (it holds all such groups) doesn't allow creating a new SyncObject; also, you cannot modify existing SyncObject objects. 


    Regards from Belarus (GMT + 2),

    Andrei Smolin
    Add-in Express Team Leader
    Friday, November 11, 2011 6:43 AM
  • Thanks Andrei very much.

    Question soluted!

    Friday, November 11, 2011 9:08 AM
  • Thank you mazhou for your nice suggestion.

     

    Hi thistiny,

    Welcome to the MSDN forum!

    This is the Chinese Version Forum for C#. So I can't move the thread directly to English Version Forum.

    You need to start a new thread in VSTO forum just like mazhou has mentioned.

    Thank you for your understanding and have a nice day!


    Yoyo Jiang[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, November 11, 2011 10:24 AM
    Moderator