D
Dhananjay
Hi All,
I am developing one VSTO addin for office 2007 in VB 2005. I have used
CDO. As per suggesion on MS site, I have given strong Name to my
addin. My addin is shown in the ol2007 perfectly, but when I tried to
open a custom form with clicking on my commandbar button, I am getting
the error as
"Could not load file or assembly Interop.MAPI, version = 1.21.0.0,
culture = nutral , publicKeytoken = ...... Or one of its dependancies.
Failed to grant permission to execute. ( Excception for HRESULT:
0x80131418)"
In my click event of the custom button, I have used some CDO
statements like
Try
Dim msg As MAPI.Message
Dim ses As New MAPI.Session
ses.Logon("", "", False, False)
msg = ses.GetMessage(myCurrentItem.EntryID)
If msg IsNot Nothing Then msg.Delete()
ses.Logoff()
msg = Nothing
ses = Nothing
Catch ex As System.Exception
AddTrace("Error while deleting mailitem - " & ex.Message)
End Try
Where am I wrong?
Thanks,
Dhananjay
I am developing one VSTO addin for office 2007 in VB 2005. I have used
CDO. As per suggesion on MS site, I have given strong Name to my
addin. My addin is shown in the ol2007 perfectly, but when I tried to
open a custom form with clicking on my commandbar button, I am getting
the error as
"Could not load file or assembly Interop.MAPI, version = 1.21.0.0,
culture = nutral , publicKeytoken = ...... Or one of its dependancies.
Failed to grant permission to execute. ( Excception for HRESULT:
0x80131418)"
In my click event of the custom button, I have used some CDO
statements like
Try
Dim msg As MAPI.Message
Dim ses As New MAPI.Session
ses.Logon("", "", False, False)
msg = ses.GetMessage(myCurrentItem.EntryID)
If msg IsNot Nothing Then msg.Delete()
ses.Logoff()
msg = Nothing
ses = Nothing
Catch ex As System.Exception
AddTrace("Error while deleting mailitem - " & ex.Message)
End Try
Where am I wrong?
Thanks,
Dhananjay