Код: Выделить всё
currentMail.Attachments[i].SaveAsFile(tempfile);
Код: Выделить всё
Cannot save the attachment. Cannot add the attachment; no data source was provided.
Что означает код ошибки -2147467259?
Подробнее об ошибке:
Код: Выделить всё
Data {System.Collections.ListDictionaryInternal} System.Collections.IDictionary {System.Collections.ListDictionaryInternal}
ErrorCode -2147467259 int
HResult -2147467259 int
HelpLink null string
InnerException null System.Exception
Message "Cannot save the attachment. Cannot add the attachment; no data source was provided." string
Source "Microsoft Outlook" string
StackTrace " at Microsoft.Office.Interop.Outlook.Attachment.SaveAsFile(String Path)\r\n
TargetSite {Void SaveAsFile(System.String)} System.Reflection.MethodBase {System.Reflection.RuntimeMethodInfo}
Подробнее здесь: https://stackoverflow.com/questions/790 ... urce-was-p