none
How to Pop Out window in Reading Pane? RRS feed

  • Question

  • Is there a way to always Pop Out new window when click Reply, Reply All, Forward in Reading Pane without change Outlook setting?

    Friday, March 2, 2018 2:56 AM

Answers

  • Hi Frederick,

    You could implement this by code below.

    Private WithEvents objExplorer As Outlook.Explorer
    Private WithEvents objMailItem As Outlook.mailItem
    Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
    
    End Sub
    Private Sub Application_Startup()
      Dim olApp As Outlook.Application
      Dim objNS As Outlook.NameSpace
      Set olApp = Outlook.Application
      Set objNS = olApp.GetNamespace("MAPI")
      Set objExplorer = objNS.Application.ActiveExplorer
    End Sub
    
    Private Sub objExplorer_Activate()
    
    End Sub
    
    Private Sub objExplorer_SelectionChange()
      Set objMailItem = objExplorer.Selection.Item(1)
    End Sub
    
    Private Sub objMailItem_Forward(ByVal Forward As Object, Cancel As Boolean)
        Cancel = True
        Forward.Display
    End Sub
    
    
    Private Sub objMailItem_Reply(ByVal Response As Object, Cancel As Boolean)
        Cancel = True
        Response.Display
    End Sub
    
    Private Sub objMailItem_ReplyAll(ByVal Response As Object, Cancel As Boolean)
        Cancel = True
        Response.Display
    End Sub
    

    Best Regards,

    Tao Zhou


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, March 2, 2018 5:29 AM

All replies

  • Hi Frederick,

    You could implement this by code below.

    Private WithEvents objExplorer As Outlook.Explorer
    Private WithEvents objMailItem As Outlook.mailItem
    Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
    
    End Sub
    Private Sub Application_Startup()
      Dim olApp As Outlook.Application
      Dim objNS As Outlook.NameSpace
      Set olApp = Outlook.Application
      Set objNS = olApp.GetNamespace("MAPI")
      Set objExplorer = objNS.Application.ActiveExplorer
    End Sub
    
    Private Sub objExplorer_Activate()
    
    End Sub
    
    Private Sub objExplorer_SelectionChange()
      Set objMailItem = objExplorer.Selection.Item(1)
    End Sub
    
    Private Sub objMailItem_Forward(ByVal Forward As Object, Cancel As Boolean)
        Cancel = True
        Forward.Display
    End Sub
    
    
    Private Sub objMailItem_Reply(ByVal Response As Object, Cancel As Boolean)
        Cancel = True
        Response.Display
    End Sub
    
    Private Sub objMailItem_ReplyAll(ByVal Response As Object, Cancel As Boolean)
        Cancel = True
        Response.Display
    End Sub
    

    Best Regards,

    Tao Zhou


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, March 2, 2018 5:29 AM
  • Hi Tao,

    Many thanks for your response.

    The .Display works, but I have to put it in InlineResponse in order to make it work.

    Private Sub olExplorer_InlineResponse(ByVal myItem As Object)
        Debug.Print "Inline Response"
        myItem.Display
        If TypeName(myItem) = "MailItem" Then
            If Len(myItem.EntryID) = 0 Then
                Debug.Print "Inline delimage"
                Call DelImageShape(myItem, "Explorer")
            End If
        End If
    End Sub

    However I have another problem, if I open two "instance" of Outlook, only the first one catch the event, the other does nothing. How to make the 2nd Outlook windows also catch the events?

    Best regards,

    Frederic Lim

    Friday, March 2, 2018 6:22 AM
  • >>How to make the 2nd Outlook windows also catch the events?

    For this new issue, please post a new thread.

    I would suggest you mark the helpful reply as answer to close this thread and thread below:

    Userform modal problem


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, March 2, 2018 6:24 AM