none
How to check if current window is inline reply or normal reply? RRS feed

  • Question

  • Hi all,

    I am developing Outlook VSTO add-in. 

    Is there any way to check if user has inline reply window open or normal stand-alone reply window open?

    My goal is..if the user has inline reply window open,

    mailItem.Display(); 

    will open the reply in stand alone reply and then

    mailItem.Send(); will send the email, since there is no way to programmatically send inline reply.


    Monday, June 24, 2019 8:01 AM

Answers

  • Hello,

    You need to use the ActiveInlineResponse property of the Explorer class which returns an item object representing the active inline response item in the explorer reading pane. This property returns Null (Nothing in Visual Basic) if no inline response is visible in the Reading Pane.


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

    • Proposed as answer by Eugene Astafiev Monday, June 24, 2019 10:49 AM
    • Marked as answer by DhirenK Wednesday, November 13, 2019 12:00 PM
    Monday, June 24, 2019 9:17 AM

All replies

  • Hello,

    You need to use the ActiveInlineResponse property of the Explorer class which returns an item object representing the active inline response item in the explorer reading pane. This property returns Null (Nothing in Visual Basic) if no inline response is visible in the Reading Pane.


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

    • Proposed as answer by Eugene Astafiev Monday, June 24, 2019 10:49 AM
    • Marked as answer by DhirenK Wednesday, November 13, 2019 12:00 PM
    Monday, June 24, 2019 9:17 AM
  • Hi Eugene

    Thank you for your helpful reply. I have found the solution. 

    object CurrentItem = application.ActiveExplorer().ActiveInlineResponse;
                if (CurrentItem != null)
                {

                   mailItem.Display();

                 }

    This would work for me. Thanks again.

    Monday, June 24, 2019 10:49 AM
  • I am glad that ActiveInlineResponse helped. Good luck with your project!


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

    Monday, June 24, 2019 3:10 PM