vba 读取msg文件

废话不多说,直接上代码!

Sub ReadContentFromMsg()

Dim App As Object

Dim Msg As Object Set App = CreateObject("Outlook.Application")

Set Msg = App.Session.OpenSharedItem("C:\Users\Desktop\test.msg")

MsgBox Msg.Subject

Set App = Nothing

Set Msg = Nothing

End Sub

你可能感兴趣的:(vba 读取msg文件)