美文网首页
vba 读取msg文件

vba 读取msg文件

作者: 孙友强 | 来源:发表于2020-05-26 10:00 被阅读0次

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

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文件

      本文链接:https://www.haomeiwen.com/subject/qckmahtx.html