Vba 如何保存收到邮件的数字签名
我正在尝试保存当前打开的邮件项目的数字签名 现在我意识到Outlook阻止通过编程方式对新电子邮件进行加密/签名。在这里,我主要关注已经收到的信息 到目前为止,我只能使用MessageClass属性来检测签名的电子邮件Vba 如何保存收到邮件的数字签名,vba,outlook-2007,digital-signature,digital-certificate,Vba,Outlook 2007,Digital Signature,Digital Certificate,我正在尝试保存当前打开的邮件项目的数字签名 现在我意识到Outlook阻止通过编程方式对新电子邮件进行加密/签名。在这里,我主要关注已经收到的信息 到目前为止,我只能使用MessageClass属性来检测签名的电子邮件 Function GetCurrentItem() As Object Dim objApp As Outlook.Application Set objApp = CreateObject("Outlook.Application") On Error
Function GetCurrentItem() As Object
Dim objApp As Outlook.Application
Set objApp = CreateObject("Outlook.Application")
On Error Resume Next
Select Case TypeName(objApp.ActiveWindow)
Case "Explorer"
Set GetCurrentItem = objApp.ActiveExplorer.Selection.Item(1)
Case "Inspector"
Set GetCurrentItem = objApp.ActiveInspector.CurrentItem
Case Else
' anything else will result in an error, which is
' why we have the error handler above
End Select
Set objApp = Nothing
End Function
Sub DoExport()
Set CurrentItem = GetCurrentItem()
If CurrentItem.MessageClass = "IPM.Note.SMIME.MultipartSigned" Then
MsgBox CurrentItem.MessageClass
End If
End Sub
即使在加密和签名的邮件上,Messageclass也似乎总是“IPM.Note”。
我使用此代码读取谁在邮件上签名。
Set-PropertyAccessor=mailitem.PropertyAccessor
If PropertyAccessor.GetProperty(“http://schemas.microsoft.com/mapi/id/{00020328-0000-0000-C000-0000000000 46}/9104001f”)“然后
结束
如果结束
即使在加密和签名的邮件上,Messageclass似乎也总是“IPM.Note”。我使用此代码读取谁在邮件上签名。
Set-PropertyAccessor=mailitem.PropertyAccessor
If PropertyAccessor.GetProperty(“http://schemas.microsoft.com/mapi/id/{00020328-0000-0000-C000-0000000000 46}/9104001f”)“然后
结束
如果结束