none
Outlook reading pane edit RRS feed

  • Question

  • Hi All

    I want change Outlook received mail message in the reading pane (when it displays the mail message). I have created add-in and I got the wordeditor (word document) from reading pane (IAccessible). I made changes in the mail message (wordeditor), but the changes not reflecting in the reading pane imdly, but if I click the mail item in the Outlook explorer window again, its shows the changes.

    This works well in the mail inspector window.

    Please advice me.


    Balamurali C

    Wednesday, June 10, 2015 5:15 PM

Answers

All replies

  • Hello Balamurali,

    Outlook caches items and doesn't reflect changes made through the OOM immediately. To get changes visible you can change the selected item programmatically and then revert changes back (see the Selection property). Or you can switch the current folder (see the CurrentFolder property of the Explorer class). 


    Wednesday, June 10, 2015 5:25 PM
  • hi Eugene

     Thanks the reply, the problem is fixed.

     The issue was, I'm changing the mail content in explore.selectionChange event, so the changes happened before even the original message being displayed in the reading pane. so the my changes will go after the original message displayed. If I click the mail item again thinks working :(.

    The fix is, I'm changing the mail content after few milliseconds (10 ms) of selection event, this works fine.

    1) How do I come to know when the mail is loaded fully in reading pane.

    This is working fine in Outlook 2013, but in 2010 its working fine only when I click the mail item through (mouse click, or space-bar) on the explorer window,  if I select the mail item through keyboard (down key or up key) its not working as expected (200ms not working, 500 ms working)

    I don't know what is the difference b/w selecting mail item on mouse and down/up key (arrow key)

    To the problem we need to know when the selected mail loaded completely. 


    Balamurali C

    Thursday, June 11, 2015 11:44 AM
  • The Outlook object mode doesn't provide any special events for that. You can use a timer to do the required modifications later.

    Also you may try to  handle the Read or Open events of the MailItem class.The Read event differs from the Open event in that Read occurs whenever the user selects the item in a view that supports in-cell editing as well as when the item is being opened in an Inspector.

    Thursday, June 11, 2015 12:04 PM
  • HI Eugene,

     is there any difference b/w outlook explorer selection event through mouse click selection and though arrow key selection.

    -Bala


    Balamurali C

    Thursday, June 11, 2015 12:35 PM
  • The Outlook object model (nor VSTO) doesn't provide any event for that. You may try to use keyboard hooks for handling keyboard buttons. See Using shortcut keys to call a function in an Office Add-in for more information.
    Thursday, June 11, 2015 1:13 PM
  • is there difference in Outlook functionality on the preview pane display? because the behavior is changes, as I said previously. (mail item selection on explorer through mouse click and through arrow key)

    Balamurali C




    • Edited by techpach Thursday, June 11, 2015 5:59 PM
    Thursday, June 11, 2015 5:50 PM
  • No, there is no difference from the Outlook object model perspective. 
    Thursday, June 11, 2015 6:35 PM