I have developed a project of Ms Office365 Outlook Add-ins(Desktop version not Web), from windows10 64 bit laptop.
the add-in has to save selected email into my sharepoint server, below is my sample code.
The problem is, when it reach SaveAs method then im receiving error as “The operation failed. at Microsoft.Office.Interop.Outlook._MailItem.SaveAs(String Path, Object Type)…”
I have read some related posts in this forum, using [https://getadmx.com/?Category=Office2016&Policy=outlk16.Office.Microsoft.Policies.Windows::L_OOMSaveAs] page i went to software\policies\microsoft\office\12.0\outlook\ but, there is no security folder so, i have created Security folder and created promptoomsaveas, then restart my lapotp then also it gives the same error.
Experts, please guide me in right direction
Public Function SaveCSEmail(ByVal email As Microsoft.Office.Interop.Outlook.MailItem, ByVal fileName As String,
ByVal contactID As Integer) As Boolean
Dim strFilePath As String = "http://MyServer/....../" & fileName & ".msg" If CheckFileExists(strFilePath) Then Exit Function **email.SaveAs(strFilePath)** Return ............ End Function