I would like to reply to a message inline with a outlook template using a macro.
I am currently using the below code to perform the reply with a template but this opens a pop out reply window.
Sub Reply_Scripting()
Dim origEmail As MailItem
Dim replyEmail As MailItem
Set origEmail = Application.ActiveWindow.Selection.Item(1)
Set replyEmail = Application.CreateItemFromTemplate("C:\Test.oft")
replyEmail.HTMLBody = replyEmail.HTMLBody & origEmail.reply.HTMLBody
replyEmail.Display
End Sub
I have found this code would help to accomplish this, but I do not how to modify it to make work in my case.
Dim myOlApp As New Outlook.Application
Public WithEvents myOlExplorer As Outlook.Explorer
Public Sub Initialize_handler()
Set myOlExplorer = myOlApp.ActiveExplorer
End Sub
Private Sub myOlExplorer_InlineResponse(ByVal Item As Object)
' do things to the Item here in the inline response
End Sub
Thanks.
I am currently using the below code to perform the reply with a template but this opens a pop out reply window.
Sub Reply_Scripting()
Dim origEmail As MailItem
Dim replyEmail As MailItem
Set origEmail = Application.ActiveWindow.Selection.Item(1)
Set replyEmail = Application.CreateItemFromTemplate("C:\Test.oft")
replyEmail.HTMLBody = replyEmail.HTMLBody & origEmail.reply.HTMLBody
replyEmail.Display
End Sub
I have found this code would help to accomplish this, but I do not how to modify it to make work in my case.
Dim myOlApp As New Outlook.Application
Public WithEvents myOlExplorer As Outlook.Explorer
Public Sub Initialize_handler()
Set myOlExplorer = myOlApp.ActiveExplorer
End Sub
Private Sub myOlExplorer_InlineResponse(ByVal Item As Object)
' do things to the Item here in the inline response
End Sub
Thanks.