I have a .msg file saved locally and I'm trying to reply to it using Excel VBA. I have this code, which takes the .msg file as a template, but does not reply to it.
I googled a lot, but i am not sure how to do this.
Any help would be appriciated!
I googled a lot, but i am not sure how to do this.
Any help would be appriciated!
VBA Code:
ub ReplyMSG()
Dim objOL As Object
Dim Msg As Object
Set objOL = CreateObject("Outlook.Application")
inPath = "C:\temp"
thisFile = Dir(inPath & "\*.msg")
Do While thisFile <> ""
Set Msg = objOL.CreateItemFromTemplate(inPath & "\" & thisFile)
Msg.Display
thisFile = Dir
Loop
Set objOL = Nothing
Set Msg = Nothing
End Sub