c# - Outlook add-in failed to read attachment path -


i trying obtain attachment path before mail sent outlook. when try so, result null. here code:

public partial class thisaddin {     private void thisaddin_startup(object sender, system.eventargs e)     {         application.itemsend += new outlook.applicationevents_11_itemsendeventhandler(application_itemsend);     }      void application_itemsend(object item, ref bool cancel)     {          outlook.mailitem mail = item outlook.mailitem;          var atts = mail.attachments;          foreach (outlook.attachment attachment in atts)         {             messagebox.show(attachment.pathname); // pathname null !         }     }      private void thisaddin_shutdown(object sender, system.eventargs e)     {      } } 

the user creates new mail , adds attachments on hard-disk. how can obtain path information of chosen files ?

that information not stored in outlook. on low level (extended mapi) attachment not have come file. imagine file dragged outlook message - there no physical file @ all.

why path matter?


Comments

Popular posts from this blog

java - Andrioid studio start fail: Fatal error initializing 'null' -

android - Gradle sync Error:Configuration with name 'default' not found -

StringGrid issue in Delphi XE8 firemonkey mobile app -